Verify Stripe payment before Storefront order capture - #95
Merged
Conversation
pull Bot
pushed a commit
to danielabelski/fleetbase
that referenced
this pull request
Aug 31, 2026
…heckout Storefront now refuses to capture a Stripe checkout whose PaymentIntent has not succeeded (fleetbase/storefront#95), and a contract run can never complete a card payment — so the stripe capture step could only ever answer 402, and with no order created the pickup and receipt requests cascaded into 'No order found.' Resequence the storefront RUN_LATE chain around the collection's new requests (fleetbase/postman#55): read the stripe checkout (status, intent update) before anything consumes the cart, assert the 402 refusal as an explicit negative contract, then initialize and capture a cash pickup checkout — which needs no provider payment — so the run creates a real order for Complete Order Pickup and Get Order Receipt. The QPay callbacks keep addressing the stripe checkout's {{checkout_id}}, unchanged. Merge AFTER fleetbase/postman#55: RUN_LATE entries are emitted as -i flags without being matched against files first, so naming requests the collection does not have yet would abort the whole run with 0 requests executed. Validated by running the orderer against the updated collection: the chain emits in the intended sequence, both new requests resolve, and no missing-entry warnings are produced.
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.
Summary
Verification
Migration and rollout
The migration adds a unique nullable stripe_payment_intent_id column to checkouts. Stripe checkouts created before deployment do not have a securely linked intent and will be rejected at capture with HTTP 422; affected customers must restart checkout. This fail-closed behavior avoids accepting an unverified client supplied intent.
API and review notes
Stripe capture can now return:
The API specification should document these responses. Payment, migration, and transaction behavior require human review before merge.
Static analysis baseline
The repository type command remains blocked by its existing configuration and framework model resolution findings. Targeted analysis confirms that baseline remains present; this PR does not expand into repository-wide static-analysis remediation.