fix: surface card network on Apple Pay and Google Pay results#67
Merged
fix: surface card network on Apple Pay and Google Pay results#67
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
4d261c2 to
865d869
Compare
RhysAtBolt
approved these changes
Apr 28, 2026
Comment on lines
126
to
+172
| @@ -168,6 +169,7 @@ export interface GooglePayResult { | |||
| token: string; | |||
| bin?: string; | |||
| last4?: string; | |||
| network?: string; | |||
Contributor
There was a problem hiding this comment.
export interface TokenizeApplePayResult {
token: string;
expiry: string;
last4: string;
bin: string;
network: CardType;
}
export interface TokenizeGooglePayResult {
token: string;
expiry: string;
last4: string;
bin: string;
network: CardType;
}
Contributor
There was a problem hiding this comment.
these will be available all the time, they won't be undefined
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.
Description
The
@boltpay/tokenizer/token/applepayand/token/googlepayresponses include anetworkfield (e.g.visa,mastercard), but the SDK was dropping it on the floor when constructingApplePayResult/GooglePayResult. This change wires it through so merchants can readresult.networkfrom the walletonCompletecallback.Testing
npx tsc --noEmit) passes.src/payments/ApplePay.tsx) and Google Pay (src/payments/GoogleWallet.tsx) tokenization callbacks. WebView mode is unaffected (it never went through the tokenizer-response shape).result.networkis populated ononComplete.Security Review
Important
A security review is required for every PR in this repository to comply with PCI requirements.
Security Impact Summary
No security-sensitive changes. The
networkvalue (card brand, e.g.visa) is non-PCI metadata already returned by the Bolt tokenizer service and is purely additive on the SDK's public result types. No changes to authentication, authorization, token handling, payment flows, or data transmission.