confirmGuestPayment and confirmPayment set the order status to
PROCESSING but never called order.setAmountPaid(...). As a result
amountPaid always read null even after payment, blocking finance
reconciliation against the Swish payout report.
The frontend test mock (GuestPaymentRedirect.spec.ts) expected
amountPaid: 49 but the real backend returned null.
Changes:
- OrderService: inject app.payment.letter-price (default 49) via
@Value and set order.setAmountPaid(BigDecimal.valueOf(letterPrice))
before save in both confirmGuestPayment and confirmPayment
- OrderServiceTest: assert amountPaid == 49 after both confirm paths
Verified: ./gradlew :backend:test — BUILD SUCCESSFUL
Closes #20
|
||
|---|---|---|
| .. | ||
| src | ||
| .gitattributes | ||
| .gitignore | ||
| build.gradle | ||
| gradlew.bat | ||