Transactions and tickets: cart, checkout, logs #26

Closed
opened 2026-10-22 18:09:12 +02:00 by amiryahaya · 1 comment
Owner

Shopping cart, server-side totals, transaction + ticket issue in one DB transaction, TransactionLog on every state change. Ref: docs/01-specification.md section 4.3.

Shopping cart, server-side totals, transaction + ticket issue in one DB transaction, TransactionLog on every state change. Ref: docs/01-specification.md section 4.3.
Author
Owner

Notes from #25: (1) Call numbering/pgstore.Store.Next BEFORE opening the sale transaction; it uses its own pool connection and holding a connection while calling it can starve the pool. (2) Add a unique index on the invoice number column so a duplicate fails loudly. (3) Invoice and check-in numbers are sequential and guessable: they are display values only and must never be an access token for any public lookup (IDOR).

Notes from #25: (1) Call `numbering/pgstore.Store.Next` BEFORE opening the sale transaction; it uses its own pool connection and holding a connection while calling it can starve the pool. (2) Add a unique index on the invoice number column so a duplicate fails loudly. (3) Invoice and check-in numbers are sequential and guessable: they are display values only and must never be an access token for any public lookup (IDOR).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/kws#26
No description provided.