fix: unwrap payment payload in order_test update requests - #69
Merged
damaz91 merged 1 commit intoJul 30, 2026
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
XiaolongZhang-TT
force-pushed
the
fix/order-test-payment-payload
branch
from
July 29, 2026 13:31
e320eea to
210def0
Compare
get_valid_payment_payload() returns {"payment": {...}, "risk_signals": {}}
(the full request body), but two update_checkout payloads in order_test.py
assigned the whole dict to the "payment" key, producing a double-nested
payment.payment.instruments and a stray risk_signals field. This would fail
against a server that strictly validates the payment object on update.
Extract ["payment"] so the payload matches the contract used by every other
call site.
XiaolongZhang-TT
force-pushed
the
fix/order-test-payment-payload
branch
from
July 29, 2026 13:42
210def0 to
db76911
Compare
XiaolongZhang-TT
marked this pull request as ready for review
July 29, 2026 13:53
damaz91
approved these changes
Jul 30, 2026
damaz91
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the changes. The fix correctly prevents the double-nested payment payload on checkout update in the two order tests, matching the API schema contract. Confirmed conformance tests pass locally.
nicholasjameshall
approved these changes
Jul 30, 2026
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.
Description
integration_test_utils.get_valid_payment_payload()returns the full request body{"payment": {...}, "risk_signals": {}}, not just the payment object. Twoupdate_checkoutpayloads inorder_test.pyassigned this whole dict to the"payment"key, producing:payment.payment.instruments(the actual instruments buried one level too deep)risk_signalsfield inside the payment objectAs a result the server would see an empty/missing
instrumentslist on these updates. The tests currently pass only because the sample server tolerates a missing instruments list on a checkout update that doesn't change payment — a stricter server that validates the payment object on update would fail. Every other call site in the suite uses the helper correctly (as the whole body), so this is the inconsistency.Fix: extract
["payment"]so the payload matches the contract used everywhere else.Type of change
Is this a Breaking Change or Removal?
N/A — test-only fix, no schema/field removal.
Checklist
🤖 Generated with Claude Code