feat: add wallet customizations for each wallets#1565
Merged
Conversation
Contributor
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
ArushKapoorJuspay
previously approved these changes
May 14, 2026
2d1ff9f to
aed2908
Compare
ArushKapoorJuspay
approved these changes
May 14, 2026
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.
Type of Change
Description
Adds support for per-wallet button style configuration objects for Apple Pay, Google Pay, and PayPal, while maintaining full backward compatibility with the existing shared wallets.style string-based API.
What changed
New per-wallet config objects
Merchants can now pass a config object for each wallet instead of (or alongside) the existing "auto" / "never" string:
Fallback chain
If a field is omitted from a per-wallet config object, it falls back to the shared wallets.style value, then to the SDK default. The existing string form ("auto" / "never") continues to work unchanged.
Type-safe variant names
Wallet field types are now named GooglePayConfigString / GooglePayConfigObj, PaypalConfigString / PaypalConfigObj, ApplePayConfigString / ApplePayConfigObj for clarity.
Apple Pay
Google Pay
PayPal
Files changed
File Change
src/Types/PaymentType.res New enum types, config records, variant types, decoders
src/Types/PaypalSDKTypes.res style record updated; styleToJson removed
src/Payments/ApplePay.res Per-wallet config resolution with shared style fallback
src/Payments/GPay.res Per-wallet config resolution with enum-to-string switches
src/Payments/PayPal.res Per-wallet config resolution
src/Payments/PaypalSDK.res Per-wallet config resolution with shared style fallback
src/Payments/PaypalSDKHelpers.res ~buttonStyle typed as PaypalSDKTypes.style
src/Utilities/PaymentUtils.res Updated variant pattern matches
src/hyper-loader/Elements.res Updated variant pattern matches; Apple Pay Never check
How did you test it?
Checklist
npm run re:build