feat: checkout + order confirmation + payment stub (ADR 0026) - #2
Merged
Conversation
PR④ of Commerce checkout. Themed private /checkout (order summary +
customer form) and /order/{ref} (confirmation) sections, plus the POST
/ext/shop/checkout action: always CSRF-verified (a cart pre-exists at
checkout), places the cart via CartPort.checkout (server-side prices,
atomic stock reservation), then redirects (POST-redirect-GET) to the
confirmation with a short-lived order cookie. The confirmation is GATED
to that cookie — an order ref can't be guessed to read another buyer's
confirmation (no IDOR). Payment is a stub (order placed 'pending').
Tracked follow-up: a dedicated per-IP checkout flood-limit — deferred
given the compensating controls (CSRF + cart-token-required + the
oversell-guarded atomic reserve). PHPStan max, 16 tests, cs-fixer green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR④ of Commerce checkout (Foodmart Slice 4). Private
/checkout+/order/{ref}sections + the/ext/shop/checkoutaction.Always CSRF-verified; places via
CartPort.checkout(server-side prices, atomic reservation); the confirmation is gated to the buyer's order cookie (no ref-guessing IDOR). Payment is a stub. Per-IP flood-limit tracked as a follow-up (compensated by CSRF + cart-token + oversell guard). See ADR 0026. PHPStan max · 16 tests · cs-fixer clean.🤖 Generated with Claude Code