Repository navigation
fix(storefront): fill the delivery quote and checkout query params - #33
Merged
Merged
Conversation
Both requests shipped every query parameter empty, so each failed on its own
validation and the published reference showed no values for endpoints that
cannot work without them. Same gap as the empty request bodies.
Retrieve a Delivery Service Quote answered "The origin field is required."
origin and destination accept a place id, a store_location id, a vehicle id, a
food_truck id, or a "lat,lng" pair — getPlaceFromId() handles all five.
Coordinates are used because that is what a storefront client usually has: the
store's position and the customer's address. No fixture is needed for them.
It now also captures {{service_quote_id}}, which Checkout/Before addresses and
nothing set.
Before answered "The gateway field is required."
`gateway` is the gateway CODE, not an id — CheckoutController reads
$request->input('gateway') and resolves it with Storefront::findGateway(), so
"stripe" is correct and matches the seeded gateway's code. The remaining params
reuse variables the run already has.
It now captures {{checkout_token}}, which Capture checkout as order and Get
Checkout Status both address and nothing set.
Co-Authored-By: Claude Opus 5 <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.
Both requests shipped every query parameter empty, so each failed on its own validation and the published reference showed no values for endpoints that cannot work without them — the same gap as the empty request bodies in #29.
Retrieve a Delivery Service Quote— "The origin field is required."originanddestinationaccept five forms, all handled bygetPlaceFromId(): a place id, astore_locationid, a vehicle id, afood_truckid, or a"lat,lng"pair.Coordinates are used because that is what a storefront client usually has — the store's position and the customer's address — and because it needs no fixture. The comment documents the other four forms.
It now also captures
{{service_quote_id}}, whichCheckout/Beforeaddresses and nothing set.Before— "The gateway field is required."gatewayis the gateway code, not an id:CheckoutControllerreads$request->input('gateway')and resolves it withStorefront::findGateway()."stripe"matches the code on the gateway the contract run seeds. The remaining params reuse variables the run already has.It now captures
{{checkout_token}}, whichCapture checkout as orderandGet Checkout Statusboth address and nothing set.Chain
These two are the head of the checkout chain —
Capture checkout as orderandGet Checkout Statuscurrently fail behind them on the unset token, andUpdate Stripe Payment Intenton the unsetservice_quote.🤖 Generated with Claude Code