-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add Google Pay yellow path #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add Google Pay yellow path #40
Conversation
- add resumeAddCardToGoogleWallet() method for resuming card provisioning using existing token reference ID - add listTokens() method to retrieve all tokens stored in Google Wallet - add AndroidResumeCardData and TokenInfo types for new functionality - update README.md with documentation for new methods These methods provide better token lifecycle management and support for existing card tokens in Google Wallet integration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it looks good. I've left some comments. Additionally, could you please add a video to the PR description that demonstrates how your solution works in our example app?
Thanks for the review! Regarding the demo video, I need to clarify the testing constraints: To demonstrate the Google Pay tokenization flow, I would need:
The testing I performed was done using my work environment, but I cannot share that footage publicly as it contains |
Greetings @Skalakid, I'm looking forward to continuing the approval process. If there's any way I can proceed, please let me know. |
Hello, had to finish some other tasks. We need to check if it actually works before merging. Since you've tested it in your unreleased app and can't attach a video here, I think we can try testing it in the Expensify app. I will try to add this flow there and will come back to you with more information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbracamonte Finally got some time to test this PR. Everything works fine. Left some last comments, and I think we can merge it ;)
yellow-path.mp4
|
||
val cardNetwork = getCardNetwork(network) | ||
val tokenServiceProvider = getTokenServiceProvider(network) | ||
val displayName = getDisplayName(data, network) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we use just cardHolderName
as a display name, like in the addCardToGoogleWallet
function? Is the getDisplayName
function necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getDisplayName function is necessary because of the different data requirements between the two methods:
- In addCardToGoogleWallet: cardHolderName is a required field in AndroidCardData, so we can use it directly as the display name.
- In resumeAddCardToGoogleWallet: Both cardHolderName and lastDigits are optional fields in AndroidResumeCardData.
This ensures we always have a meaningful display name for the Google Wallet UI, even when optional fields are missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So let's also add getDisplayName
to addCardToGoogleWallet()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 🫡
} | ||
|
||
return "${network.uppercase(Locale.getDefault())} Card" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the above comment, why do we need this?
Greetings @Skalakid, I look forward to your comments so we can continue with the integration. |
This PR introduces new features to integrate the Google Pay yellow path flow, allowing users to resume adding cards to Google Wallet and managing existing tokens. This is essential to comply with Google Pay requirements.
Summary
resumeAddCardToGoogleWallet()
method for resuming card provisioning using existing token reference IDlistTokens()
method to retrieve all tokens stored in Google WalletAndroidResumeCardData
andTokenInfo
Changes Made
Android Native (Kotlin)
resumeAddCardToGoogleWallet
andlistTokens
methods with proper error handlingTypeScript/React Native
Documentation
Features
resumeAddCardToGoogleWallet(cardData: AndroidResumeCardData)
tokenReferenceId
TokenizationStatus
to track the operation resultlistTokens()
TokenInfo
objects containing:tokenReferenceId
: Unique token identifierfpanLastFour
: Last four digits of the tokenized cardtokenState
: Current state of the token (numeric value)