fix: carry buyer from checkout_obj in update_checkout_session#25
Open
donbenny0 wants to merge 2 commits intoUniversal-Commerce-Protocol:mainfrom
Open
fix: carry buyer from checkout_obj in update_checkout_session#25donbenny0 wants to merge 2 commits intoUniversal-Commerce-Protocol:mainfrom
donbenny0 wants to merge 2 commits intoUniversal-Commerce-Protocol:mainfrom
Conversation
…s.py` does not carry the buyer information from the current checkout object into the update payload when no explicit `buyer` argument is provided. As a result, the PUT request is sent without a `buyer` field, which prevents the server from identifying the customer and injecting their stored addresses.
|
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. |
Author
|
I signed the CLA |
Author
|
I signed the CLA |
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
update_checkout_sessioninconformance/integration_test_utils.pywas not propagatingbuyer information from the existing checkout object into the update payload. When no
explicit
buyerargument is passed, the field stayedNoneand was stripped out byexclude_none=Trueduring serialisation.This broke
test_known_customer_one_address(and any future test relying on buyer-awareserver logic during an update), because the server received no buyer identity and could
not inject the customer's stored addresses into the fulfillment response.
Fixes: #24
Type of change
Checklist
The one-line fix added on line 813 of integration_test_utils.py:
integration_test_utils.py
Lines 812-813
This makes
buyerconsistent with every other field in the method and ensures the server always receives the customer identity during updates, enabling correct address injection for known customers.