Merged
Conversation
64ebd3b to
5ba1bd6
Compare
There was a problem hiding this comment.
Pull request overview
Adds initial Google Pay (digital wallet) support to the SDK by introducing a digital-wallet data model from BFF → public types, rendering a Google Pay button component, and wiring a digital-wallet submission path into the existing submission lifecycle.
Changes:
- Introduce
digital_walletsBFF schema + public digital wallet types and marshaling (bffDigitalWalletsToPublic), plusgetActiveDigitalWallets(). - Add digital wallet UI components (Google Pay button + container + script-load gating) and SDK API to create/render/destroy digital wallet components.
- Update submission behavior-tree plumbing to support “instant submission errors” and digital-wallet submissions; adjust dev/test setup (certs + dev page script).
Reviewed changes
Copilot reviewed 25 out of 28 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| test-key.pem | Fix PEM footer formatting for the dev/test private key. |
| test-cert.pem | Fix PEM footer formatting for the dev/test certificate. |
| sdk/src/utils.test.ts | Adjust cancellable sleep timing assertion to reduce flakiness. |
| sdk/src/styles.css | Add styling for a digital wallet section and Google Pay container. |
| sdk/src/public-sdk.ts | Add digital wallet APIs, state, rendering, and digital-wallet submission path. |
| sdk/src/public-options-types.ts | Add DigitalWalletOptions and a new (currently unused) public type. |
| sdk/src/public-data-types.ts | Add public XenditDigitalWallet / XenditDigitalWalletCode types. |
| sdk/src/locale/en.json | Add localized Google Pay error strings. |
| sdk/src/lifecycle/behaviors/submission.ts | Add SubmissionError support + “instant submission error” short-circuit. |
| sdk/src/lifecycle/behavior-tree.ts | Add blackboard fields for digital-wallet submissions and skip form validation for them. |
| sdk/src/lifecycle/behavior-tree.test.ts | Update test blackboard/world mock to include new fields. |
| sdk/src/data/test-data.ts | Add mock digital_wallets.google_pay BFF payload for tests/dev. |
| sdk/src/components/session-provider.tsx | Add DigitalWalletsContext and gate rendering based on SDK/session ACTIVE. |
| sdk/src/components/payment-channel.tsx | Remove redundant ACTIVE gating (now handled by session provider). |
| sdk/src/components/digital-wallet-wait-for-load.tsx | New helper component to defer rendering until a wallet SDK script loads. |
| sdk/src/components/digital-wallet-googlepay.tsx | New Google Pay button + payment data collection + submission integration. |
| sdk/src/components/digital-wallet-container.tsx | New wallet container to select/render the correct wallet implementation. |
| sdk/src/components/channel-picker.tsx | Add (currently disabled) digital wallet section insertion point. |
| sdk/src/components/channel-picker-digital-wallet-section.tsx | New channel picker section that inserts the Google Pay component. |
| sdk/src/bff-marshal.ts | Add bffDigitalWalletsToPublic marshaler for public digital wallet list. |
| sdk/src/backend-types/digital-wallets.ts | New backend type for the digital_wallets payload shape. |
| sdk/src/backend-types/common.ts | Extend BFF response type to include optional digital_wallets. |
| sdk/build.ts | Ensure the dev/test page loads the Google Pay JS SDK. |
| pnpm-lock.yaml | Lockfile updates for @types/googlepay. |
| package.json | Add @types/googlepay dependency. |
| README.md | Add (currently commented-out) docs sections for digital wallet APIs/support. |
| CONTRIBUTING.md | Update dev instructions: browser must trust the cert for Google Pay to work. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 28 changed files in this pull request and generated 8 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c398080 to
afa54e0
Compare
Fix build Polish for googlepay button Polish up googlepay support Fix build error Fix googlepay issues Cleanup Fix googlepay channel properties, add public option to enable digital wallets Unknown error handling Minor fixes Fix crash Allow prod mode, typos Remove full billing address
afa54e0 to
be3c40b
Compare
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.
getActiveDigitalWalletscreateDigitalWalletContainer