Skip to content

simplestore: mark expired orders canceled, not paid#767

Open
karamble wants to merge 1 commit into
companyzero:masterfrom
karamble:fix-simplestore-expired-order-status
Open

simplestore: mark expired orders canceled, not paid#767
karamble wants to merge 1 commit into
companyzero:masterfrom
karamble:fix-simplestore-expired-order-status

Conversation

@karamble

Copy link
Copy Markdown

simplestore.invoiceExpired() is a near-verbatim copy of invoiceSettled() and set order.Status = StatusPaid for an order whose invoice expired without payment, so an unpaid expired order was indistinguishable from a real sale and any StatusChanged consumer keying on StatusPaid saw a false payment.

This sets the existing (previously unused) StatusCanceled instead, and fixes the copied "// Mark order as paid." comment. invoiceExpired already correctly skips the digital-file send loop and notifies the buyer the order expired, so only the status assignment changes.

Closes #766

invoiceExpired was a copy of invoiceSettled and set order.Status to StatusPaid for an order whose invoice expired without payment, so an unpaid expired order was indistinguishable from a real sale and any StatusChanged consumer keying on StatusPaid saw a false payment. Set StatusCanceled instead and fix the copied comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

simplestore: expired (unpaid) orders are marked as paid

2 participants