[Security] Honor-system payment confirmation: no Swish money verification on guest /pay endpoint #18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Identified during advisory review of #17 (guest checkout).
Problem
POST /api/guest-orders/{token}/payis public (no JWT) andconfirmGuestPaymentsimply transitionsPENDING_PAYMENT -> PROCESSINGwithout verifying that any Swish payment was received. The flow is: create order (no auth) -> getguest_tokenin response -> POST/pay-> order is nowPROCESSINGand heads to fulfillment (triggersnotifyOrderProcessing).A guest can mark an order paid without paying, and BilHej eats the PostNord cost for a free letter. The existing authenticated
confirmPaymenthas the same honor-system design (acknowledged Phase 0), but the guest path removes account-level traceability and is fully anonymous.Severity
Critical
Suggested fix
PROCESSINGafter a verifiedPAIDcallback.pending_reviewstatus visible in admin tooling rather thanPROCESSING, so fulfillment is gated on manual confirmation.References