Skip to content

feat: Google Pay#147

Merged
simon-paris merged 2 commits intomainfrom
feat/google-pay
Mar 6, 2026
Merged

feat: Google Pay#147
simon-paris merged 2 commits intomainfrom
feat/google-pay

Conversation

@simon-paris
Copy link
Contributor

@simon-paris simon-paris commented Feb 9, 2026

  • Added googlepay implementation
  • Add public API for getActiveDigitalWallets
  • Add public API for createDigitalWalletContainer
  • Fix testing certs, configuring the browser to trust the test certs is now required

@simon-paris simon-paris requested a review from ndyhrdy February 9, 2026 10:03
@simon-paris simon-paris force-pushed the feat/google-pay branch 2 times, most recently from 64ebd3b to 5ba1bd6 Compare February 23, 2026 06:06
@simon-paris simon-paris marked this pull request as ready for review February 26, 2026 08:21
@simon-paris simon-paris requested a review from a team as a code owner February 26, 2026 08:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_wallets BFF schema + public digital wallet types and marshaling (bffDigitalWalletsToPublic), plus getActiveDigitalWallets().
  • 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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
@simon-paris simon-paris enabled auto-merge (squash) March 6, 2026 09:23
Copy link
Contributor

@ndyhrdy ndyhrdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@simon-paris simon-paris merged commit 4e1c713 into main Mar 6, 2026
9 checks passed
@simon-paris simon-paris deleted the feat/google-pay branch March 6, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants