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
tokenState
isGooglePayTokenState.TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION
, show theAdd to Google Pay
button (yellow path
). - If
tokenState
is NOTGooglePayTokenState.TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION
, the card is already in the wallet. Do NOT show theAdd to Google Pay
button.
- If
- You don't receive any
tokenId
: show theAdd to Google Pay
button.
Add Card to Wallet
You have 2 methods to add a card to the wallet:
- No
tokenId
→ basic flow. UseMeaPushProvisioning.GooglePay.pushCard(...)
- Have
tokenId
, buttokenState
isGooglePayTokenState.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.registerDataChangedListener
MeaPushProvisioning.GooglePay.removeDataChangedListener
Updated 10 days ago