bilhej/backend/src/main
Hermes Agent 7d6d541354
Some checks failed
CI / Lint, type check, unit tests, coverage (pull_request) Successful in 3m26s
CI / E2E browser tests (pull_request) Failing after 1m53s
fix(payment): persist amountPaid on payment confirmation
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
2026-07-18 11:38:10 +00:00
..
java/se/bilhalsning fix(payment): persist amountPaid on payment confirmation 2026-07-18 11:38:10 +00:00
resources fix(db): make V12 migration H2-compatible (drop partial-index WHERE clauses) 2026-06-22 10:35:56 +00:00