Skip to content

feat: make Google OPC support opt-in - #141

Merged
chuckdries merged 1 commit into
mainfrom
korytko/google-opc-supported-flag
Dec 3, 2026
Merged

chuckdries merged 1 commit into
mainfrom
korytko/google-opc-supported-flag

Conversation

@JakubKorytko

Copy link
Copy Markdown
Member

Details

getGoogleOpaquePaymentCardSupported() was hardcoded to true, so every addCardToGoogleWallet() call told Google Wallet we can generate the Google OPC and went through UAPP. The backend side of UAPP is gated per card program by a beta and returns 403 when it's off, so an app that can't do UAPP for a given card has no way to fall back to the legacy push provisioning flow.

This adds an optional isGoogleOpaquePaymentCardSupported to AndroidCardData and returns it from the generator. It defaults to false: Google Wallet then only asks for the TSP OPC, the generator answers it from opaquePaymentCard and the payment credentials handler is not called. Apps turn UAPP on per card by passing true.

The handler stays a required argument of addCardToGoogleWallet() to keep the API unchanged. The README, docs/UAPP.md and the example app's dummy card are updated to set the flag.

Related Issues

#58

Manual Tests

In apps/basic-example/android, compile the library module on both architectures:

./gradlew -PnewArchEnabled=true :expensify_react-native-wallet:compileDebugKotlin
./gradlew -PnewArchEnabled=false :expensify_react-native-wallet:compileDebugKotlin :expensify_react-native-wallet:compileDebugJavaWithJavac

Both succeed. End-to-end provisioning will be tested from the App and Mobile-Expensify PRs below once this is released, since it needs a real card and the backend beta.

Linked PRs

@JakubKorytko

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@JakubKorytko
JakubKorytko marked this pull request as ready for review December 3, 2026 12:12
@chuckdries
chuckdries merged commit 382bb53 into main Dec 3, 2026
7 of 8 checks passed
@os-botify

os-botify Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Published to npm in 0.3.4 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants