Skip to content

feat(checkout): Apple Pay and Google Pay checkout buttons - #991

Merged
github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
davidsoniaudin2-oss:feat/916-apple-google-pay-checkout
Sep 28, 2026
Merged

github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
davidsoniaudin2-oss:feat/916-apple-google-pay-checkout

Conversation

@davidsoniaudin2-oss

Copy link
Copy Markdown
Contributor

Summary

Closes #916.

Adds Apple Pay and Google Pay support at checkout: merchants register per provider, verify the domains they take payments from, and run the standard wallet flow (session → merchant validation → token processing) backed by a feature-detected button component.

What changed

  • backend/src/services/wallet-payments.ts — WalletPaymentService: merchant registration and provider networks, domain registration/verification, payment sessions with expiry, the Apple Pay merchant-validation handshake, and encrypted token processing that validates network support and token expiry.
  • backend/src/routes/wallet-payments.ts — REST API mounted at /api/v1/wallet-payments.
  • frontend/src/components/payments/WalletPayButtons.tsx — branded Apple Pay / Google Pay buttons with browser feature detection (overridable for SSR/tests) and an "unavailable on this device" fallback.
  • backend/src/index.ts — router registration.
  • docs/WALLET_PAYMENTS.md — feature documentation.

Behaviour notes

  • Sessions require at least one verified domain; Apple Pay requires a merchantIdentifier.
  • Unsupported networks and expired tokens mark the session failed with a failureReason.
  • The component renders both buttons, each labelled with the formatted amount and currency.

Tests

  • backend/src/services/__tests__/wallet-payments.test.ts — 27 tests covering onboarding, domain verification, session lifecycle/expiry, merchant validation, token processing, and all failure paths.
  • frontend/src/components/payments/__tests__/WalletPayButtons.test.tsx — 7 tests covering rendering, availability overrides, amount formatting, disabled state, and fallback.

All passing; typecheck and lint clean for the new files.

Verification

cd backend && npx vitest run src/services/__tests__/wallet-payments.test.ts
cd frontend && npx vitest run src/components/payments/__tests__/WalletPayButtons.test.tsx

Adds wallet merchant onboarding with domain verification, payment sessions
with the Apple Pay merchant-validation handshake, and encrypted token
processing that validates network support and token expiry. Ships a
feature-detected WalletPayButtons component for the checkout UI.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@davidsoniaudin2-oss is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@davidsoniaudin2-oss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions
github-actions Bot merged commit 430cefc into Smartdevs17:main Sep 28, 2026
2 of 3 checks passed
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.

Add Apple Pay and Google Pay checkout buttons

1 participant