| @bigcommerce/catalyst-core | minor |
|---|
Add Wallet Payment buttons integration for cart page
- Render wallet payment buttons (e.g. PayPal) on the cart page when payment wallets are configured for the cart.
- Added
getPaymentWallets,getPaymentWalletWithInitializationData, andgetCurrencyDataGraphQL queries in the cart'spage-data.tsto fetch configured wallets and their initialization data. - Added a
ClientWalletButtonsclient component (core/components/wallet-buttons) that streams wallet init options and renders a container per wallet button. - Added a
WalletButtonsInitializer(core/lib/wallet-buttons) that lazily injects the BigCommerce Checkout SDK loader script and initializes each wallet button against the/graphqlendpoint, with anInitializationErrorfor missing loader. - Wired
walletButtonsInitOptionsandcartIdthrough the cart section component, and exposedgetCurrencyDatacurrency formatting details. - Extended the GraphQL proxy (
with-graphql-proxy.ts/proxy.ts) to support Checkout SDK wallet-button requests. - Added
NEXT_PUBLIC_CHECKOUT_SDK_DEV_URLto.env.exampleto optionally override the Checkout SDK loader URL in development. - Added e2e coverage (
wallet-buttons.spec.ts) verifying the loader script and wallet button containers render only when wallets are configured.