Add googlePay shipping address & shipping options collection - #105
Open
ana-maksimovskikh wants to merge 10 commits into
Open
Add googlePay shipping address & shipping options collection#105ana-maksimovskikh wants to merge 10 commits into
ana-maksimovskikh wants to merge 10 commits into
Conversation
ana-maksimovskikh
force-pushed
the
ana/card-1060-a-google-pay-android-shipping-address-option-dynamic-price
branch
from
September 4, 2026 10:24
25121ec to
8b46f6d
Compare
ana-maksimovskikh
marked this pull request as ready for review
September 4, 2026 10:55
Contributor
|
Hey I’ve implemented the equivalent Google Pay web shipping work in evervault-js #1006. I used this PR as refernce for the same core model but still keeping the web API idiomatic to js. The web callback contract is defined here. The sheet state and dynamic update handling are implemented here. These are some things the impls share: But I think here are a few things we can do to align this android PR (happy to talk through it when you're back too):
This would be good so the customer-visible behaviour and data model match, but each SDK kept idiomatic. |
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.
External docs update: https://github.com/evervault/docs/pull/868
Adds to Google Pay Android (the missing piece vs Apple Pay and Google Pay web (ticket)).
What's new
Config.shippingAddress/Transaction.shippingOptions— opt in to address collection and offer a fixed shipping-option list.Config.googlePayShipping+GooglePayShippingHandler— invoked on every address/option change in the sheet; can accept (with a recomputed total) or reject the current selection.TokenResponse.shippingAddress/.shippingOptionon the final result.ENABLE_GOOGLE_PAY_SHIPPING=truewires up a sample handler demonstrating destination-based rejection and pricing.Design choice: fixed option list, not dynamic
A handler can recompute the total per destination but can't add/remove/reprice options in the list itself.
Matches Apple Pay web, Apple Pay iOS, and the still-unbuilt Google Pay web sibling ticket (CARD-1057).
Filed CARD-1235 to track a fully dynamic list as a future decision.
Worth flagging in review
Amount.format()wentinternal→public: it's the only way a merchant's handler (a separate module) can read an amount to compute a new total.ShippingOption.label.extractPaymentShippingAddress: Gson deserialized Google Pay's""for inapplicable fields (e.g. noaddress2in Japan) straight through instead ofnull.Verified
PaymentRequestTest,GooglePayShippingTest,PaymentDataTest,GooglePayResponseParityTest.