Pass cardID in Apple Wallet CreateDigitalWallet request#84091
Conversation
The iOS flow was not passing cardID to the backend, causing the wrong card to be tokenized when a user has multiple OPEN virtual cards. This matches the existing Google Wallet behavior. Made-with: Cursor
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@joekaufmanexpensify tried to test on the adhoc but seems like the vitual card tokenization does not work on adhocs so we will need to merge and test in staging |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.32-0 🚀
|
|
Noted in Slack, but seems like Joe tested on previous staging version before this PR so we need to retest on the correct version |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.32-3 🚀
|
|
Retested today and the fix is working. I was able to tokenize multiple virtual cards from the same account to Apple pay 👍 |


Explanation of Change
The Apple Wallet (iOS) flow calls
CreateDigitalWalletwithout acardID, so when a user has multiple OPEN virtual cards the backend defaults to tokenizing an arbitrary card instead of the one the user selected. The Google Wallet (Android) flow already passescardIDcorrectly.This PR fixes the iOS flow by:
cardID: numbertoCreateDigitalAppleWalletParamscardIDas a required parameter toissuerEncryptPayloadCallbackand forwarding it in the API requestindex.ios.tswith a closure that capturescard.cardIDfrom the calling scopeFixed Issues
$ #73201
Tests
Offline tests
N/A — Apple Wallet provisioning requires an active network connection.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari