Hints
Simple explanation of how to use the SDK methods.
Initialize SDK
Initialize the SDK using this method.
Check for Cards in the Wallet
First, try using MeaPushProvisioning.GooglePay.checkWalletForCardToken(...) to get the tokenId and tokenState.
If that method doesn't find anything, try MeaPushProvisioning.GooglePay.getRegisteredTokens(...).
Possible outcomes:
- You get a
tokenId:- If
tokenStateisGooglePayTokenState.TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION, show theAdd to Google Paybutton (yellow path). - If
tokenStateis NOTGooglePayTokenState.TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION, the card is already in the wallet. Do NOT show theAdd to Google Paybutton.
- If
- You don't receive any
tokenId: show theAdd to Google Paybutton.
Add Card to Wallet
You have 2 methods to add a card to the wallet:
- No
tokenId→ basic flow. UseMeaPushProvisioning.GooglePay.pushCard(...) - Have
tokenId, buttokenStateisGooglePayTokenState.TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION→ yellow flow. UseMeaPushProvisioning.GooglePay.tokenize(...)
Subscribe to Wallet Data Change Events
Use these two methods to manage wallet change events:
MeaPushProvisioning.GooglePay.registerDataChangedListenerMeaPushProvisioning.GooglePay.removeDataChangedListener
Updated 3 months ago
