Class MeaPushProvisioning.GooglePay
- Enclosing class:
- MeaPushProvisioning
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDecline activation type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidReturns the user to Google Wallet after the activation process is complete.static voidPasses Activation Code to to Google Wallet.static voidactivate(com.google.android.gms.tapandpay.issuer.TokenInfo tokenInfo, Activity activity, MppActivateListener listener) Activates token using TSP and returns back to the Google Wallet.static voidactivate(String tokenUniqueReference, MppPaymentNetwork paymentNetwork) Activates using TSP.static voidactivate(String tokenUniqueReference, MppPaymentNetwork paymentNetwork, MppActivateListener listener) Activates using TSP.static voidcheckWalletForCardSuffix(String cardSuffix, GooglePayRegisteredTokensListener listener) Checks if the Google Pay token with provided PAN suffix is available in the Google Pay Wallet.static voidcheckWalletForCardToken(MppCardDataParameters cardData, GooglePayTokenListener listener) Checks if the Google Pay token for the corresponding card is available in the Google Pay Wallet.static voidcheckWalletForToken(MppPaymentNetwork paymentNetwork, String tokenId, GooglePayTokenListener listener) Checks if the Google Pay token with passed payment network and tokenId is available in the Google Pay Wallet.static voiddeclineActivation(Activity activity, MeaPushProvisioning.GooglePay.ActivationResult activationResult) Declines activation with status.static voidgetActivationCode(MppCardDataParameters cardData, Context context, MppActivationCodeListener listener) Gets activation code (authentication code, TAV) for app-to-app verification.static StringgetActivationCode(MppCardDataParameters cardData, String walletId, String deviceId, Context context) Gets activation code (authentication code, TAV) for app-to-app verification.static voidgetActivationCode(MppCardDataParameters cardData, String walletId, String deviceId, Context context, MppActivationCodeListener listener) Gets activation code (authentication code, TAV) for app-to-app verification.static voidGet a list of tokens and associated metadata registered to the active wallet.static voidgetTokenInfo(Intent intent, GooglePayTokenInfoListener listener) Gets TokenInfo using Token Unique Reference from Intent's data.getTokenizationData(MppCardDataParameters cardData, String walletId, String deviceId, Context context) Get Google Pay Push Provisioning tokenization data which includes Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.static voidgetTokenizationData(MppCardDataParameters cardData, String walletId, String deviceId, Context context, MppGetOemTokenizationDataListener listener) Get Google Pay Push Provisioning tokenization data.getTokenizationData(MppCardDataParameters cardData, String walletId, String deviceId, String serverSessionId, boolean googleOpaquePaymentCardRequested, Context context) Get Google Pay Push Provisioning tokenization data which includes Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.static voidgetTokenizationData(MppCardDataParameters cardData, String walletId, String deviceId, String serverSessionId, boolean googleOpaquePaymentCardRequested, Context context, MppGetOemTokenizationDataListener listener) Get Google Pay Push Provisioning tokenization data.static MppGetTokensResponseDatagetTokens(MppCardDataParameters cardData, String walletId, String deviceId, Context context) Get Google Pay tokens for the specified card.static voidgetTokens(MppCardDataParameters cardData, String walletId, String deviceId, Context context, MppGetTokensListener listener) Get Google Pay tokens for the specified card.static booleanhandleOnActivityResult(int requestCode, int resultCode, Intent intent, Activity activity) Handles intermediate results returned by Activity.onActivityResult(int, int, Intent) method as a result of method calls from MPP SDK related to the Google Pay.static voidhandlePushCardOnActivityResult(int requestCode, int resultCode, Intent intent, Activity activity) Deprecated.static booleanisDefaultPaymentApplication(Context context) Issuer app should check if Google Pay is the default NFC payment app after card tokenization.static booleanisPushCardRequestCode(int requestCode) Deprecated.Should not be used anymore,handleOnActivityResult(int, int, Intent, Activity)method returns a boolean flag showing whether data are handled by MPP SDK or not.static voidisTokenized(String tokenId, String issuerName, MppPaymentNetwork paymentNetwork, GooglePayIsTokenizedListener listener) Checks if card is tokenizedstatic booleanisWalletAvailable(Context context) Checks if Google Wallet is installed on device.static voidpush(MppCardDataParameters cardData, String cardDisplayName, com.google.android.gms.tapandpay.issuer.UserAddress userAddress, Activity activity, MppPushCardToGooglePayListener listener) Starts push tokenization flow to Google Pay application for a card, first checking Google Pay wallet state, then getting Opaque Payment Card (OPC) by making remote request to MeaWallet backend, finally OPC with other card attributes are pushed to Google Pay using Unified Google Pay Push Provisioning API.static voidpushCard(MppCardDataParameters cardData, String cardDisplayName, com.google.android.gms.tapandpay.issuer.UserAddress userAddress, Activity activity, MppPushCardToGooglePayListener listener) static voidRegisters Google Pay wallet data changed listener.static voidRemoves Google Pay wallet data changed listener.static voidrequestTokenDeleteDialog(Activity activity, GooglePayTokenInfo googlePayTokenInfo, GooglePayTokenDeleteListener listener) Shows a dialog asking the user to confirm the deletion of the passed Google Pay token from the Google Pay Wallet.static voidrequestTokenSelectDialog(Activity activity, GooglePayTokenInfo googlePayTokenInfo, GooglePayTokenSelectListener listener) Shows a dialog asking the user to confirm the intention to set the passed Google Pay token as their Default card in Google Pay Wallet.static voidsendUserToGooglePay(Activity activity) Helper method to send user to the Google Pay app to see the tokenized card.static voidsetAsDefaultPaymentApplication(Activity activity, int requestCode) Set Google Pay as a default app for NFC payments.static voidtokenize(GooglePayTokenInfo googlePayTokenInfo, String cardDisplayName, Activity activity, GooglePayTokenizeListener listener) Activates a token in yellow path or starts the manual tokenization flow in which the user needs to scan the card or enter all card details manually in a form.static voidviewToken(String tokenId, MppPaymentNetwork paymentNetwork, GooglePayPendingIntentListener listener) Method will only return an intent that have been registered by an app with the same Android package as the caller.
-
Constructor Details
-
GooglePay
public GooglePay()
-
-
Method Details
-
pushCard
@Deprecated public static void pushCard(@NonNull MppCardDataParameters cardData, @NonNull String cardDisplayName, @Nullable com.google.android.gms.tapandpay.issuer.UserAddress userAddress, @NonNull Activity activity, @NonNull MppPushCardToGooglePayListener listener) throws MppException Deprecated.Starts push tokenization flow to Google Pay application for a card, first checking Google Pay wallet state, then getting Opaque Payment Card (OPC) by making remote request to MeaWallet backend, finally OPC with other card attributes are pushed to Google Pay using Google Pay Push Provisioning API.In the process of wallet creation or token push provisioning the Google Pay application may return intermediate results through the Activity.onActivityResult(int, int, Intent) method. In order to support automatic push tokenization flow the issuer application needs to pass these intermediate results to the
handleOnActivityResult(int, int, Intent, Activity)method. Result of the push tokenization flow will be returned usingMppPushCardToGooglePayListenercallback.protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (MeaPushProvisioning.GooglePay.handlePushCardOnActivityResult(requestCode, resultCode, data, this) { // ... handled by MPP SDK } }- Parameters:
cardData- Card data object containing the card information to be provisioned by the token requester.cardDisplayName- Display name or nickname used to describe the payment card in the Google Pay application user interface.userAddress- The user's address. Push tokenization takes a UserAddress that must be provided in order to skip manual address entry. The issuer application should provide the entire address and phone number on file. Missing or invalid address information may result in the user being prompted to complete or correct the address. The address should be the correct address of the issuer's knowledge. Using a fake or intentionally incorrect addresses is not permitted by the Push Provisioning API terms of service.activity- TheActivitywhich will handleActivity.onActivityResult(int, int, Intent)callback.listener- The listener asMppPushCardToGooglePayListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
push
public static void push(@NonNull MppCardDataParameters cardData, @NonNull String cardDisplayName, @Nullable com.google.android.gms.tapandpay.issuer.UserAddress userAddress, @NonNull Activity activity, @NonNull MppPushCardToGooglePayListener listener) throws MppException Starts push tokenization flow to Google Pay application for a card, first checking Google Pay wallet state, then getting Opaque Payment Card (OPC) by making remote request to MeaWallet backend, finally OPC with other card attributes are pushed to Google Pay using Unified Google Pay Push Provisioning API.In the process of wallet creation or token push provisioning the Google Pay application may return intermediate results through the Activity.onActivityResult(int, int, Intent) method. In order to support automatic push tokenization flow the issuer application needs to pass these intermediate results to the
handleOnActivityResult(int, int, Intent, Activity)method. Result of the push tokenization flow will be returned usingMppPushCardToGooglePayListenercallback.protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (MeaPushProvisioning.GooglePay.handlePushCardOnActivityResult(requestCode, resultCode, data, this) { // ... handled by MPP SDK } }- Parameters:
cardData- Card data object containing the card information to be provisioned by the token requester.cardDisplayName- Display name or nickname used to describe the payment card in the Google Pay application user interface.userAddress- The user's address. Push tokenization takes a UserAddress that must be provided in order to skip manual address entry. The issuer application should provide the entire address and phone number on file. Missing or invalid address information may result in the user being prompted to complete or correct the address. The address should be the correct address of the issuer's knowledge. Using a fake or intentionally incorrect addresses is not permitted by the Push Provisioning API terms of service.activity- TheActivitywhich will handleActivity.onActivityResult(int, int, Intent)callback.listener- The listener asMppPushCardToGooglePayListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
checkWalletForCardToken
public static void checkWalletForCardToken(@NonNull MppCardDataParameters cardData, @NonNull GooglePayTokenListener listener) throws MppException Checks if the Google Pay token for the corresponding card is available in the Google Pay Wallet. This check requires a network call, therefore it is recommended to usecheckWalletForToken(MppPaymentNetwork, String, GooglePayTokenListener)whenever the data required for this method call is available.- Parameters:
cardData- Card data object containing the card information to be provisioned by the token requester.listener- The listener asGooglePayTokenListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
checkWalletForToken
public static void checkWalletForToken(@NonNull MppPaymentNetwork paymentNetwork, @NonNull String tokenId, @NonNull GooglePayTokenListener listener) throws MppException Checks if the Google Pay token with passed payment network and tokenId is available in the Google Pay Wallet.- Parameters:
paymentNetwork- Card payment networktokenId- token Idlistener- The listener asGooglePayTokenListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
checkWalletForCardSuffix
public static void checkWalletForCardSuffix(@NonNull String cardSuffix, @NonNull GooglePayRegisteredTokensListener listener) throws MppException Checks if the Google Pay token with provided PAN suffix is available in the Google Pay Wallet.- Parameters:
cardSuffix- Card suffix.listener- The listener asGooglePayRegisteredTokensListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
tokenize
public static void tokenize(@NonNull GooglePayTokenInfo googlePayTokenInfo, @NonNull String cardDisplayName, @NonNull Activity activity, @NonNull GooglePayTokenizeListener listener) throws MppException Activates a token in yellow path or starts the manual tokenization flow in which the user needs to scan the card or enter all card details manually in a form. Tokens added using this method are added to the active wallet.- Parameters:
googlePayTokenInfo- GooglePayTokenInfo containing token information for continuing tokenization.cardDisplayName- Display name or nickname used to describe the payment card in the Google Pay application user interface.activity- Activity instance to be used for Dialog.listener- The listener asGooglePayTokenizeListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
getActivationCode
public static void getActivationCode(@NonNull MppCardDataParameters cardData, @NonNull Context context, @NonNull MppActivationCodeListener listener) Gets activation code (authentication code, TAV) for app-to-app verification.- Parameters:
cardData- Card data object containing the card information to be provisioned by the token requester.context- TheActivityproviding context.listener- The listener asMppActivationCodeListenerinstance.
-
getActivationCode
public static void getActivationCode(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @NonNull Context context, @NonNull MppActivationCodeListener listener) Gets activation code (authentication code, TAV) for app-to-app verification.- Parameters:
cardData- Card data object containing the card information to be provisioned by the token requester.walletId- Optional wallet ID of the active wallet.deviceId- Optional device ID of the active wallet.context- Application context.listener- The listener asMppActivationCodeListenerinterface.
-
getActivationCode
public static String getActivationCode(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @NonNull Context context) throws MppException, NetworkOnMainThreadException Gets activation code (authentication code, TAV) for app-to-app verification.- Parameters:
cardData- Card data object containing the card information to be provisioned by the token requester.walletId- Optional wallet ID of the active wallet.deviceId- Optional device ID of the active wallet.context- Application context.- Returns:
- Activation code.
- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.NetworkOnMainThreadException- Method should not be called on the Main thread.
-
activate
public static void activate(@NonNull Activity activity, @NonNull String activationCode) throws MppException Passes Activation Code to to Google Wallet.- Parameters:
activity- Token activation activity.activationCode- Activation code.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
activate
Returns the user to Google Wallet after the activation process is complete.- Parameters:
activity- Token activation activity.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
declineActivation
public static void declineActivation(@NonNull Activity activity, @NonNull MeaPushProvisioning.GooglePay.ActivationResult activationResult) throws MppException Declines activation with status.- Parameters:
activity- Token activation activity.activationResult- Activation result.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
getTokenInfo
public static void getTokenInfo(@NonNull Intent intent, @NonNull GooglePayTokenInfoListener listener) throws MppException Gets TokenInfo using Token Unique Reference from Intent's data.- Parameters:
intent- Intentlistener- The listener asGooglePayTokenInfoListenerinterface.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
activate
public static void activate(@NonNull com.google.android.gms.tapandpay.issuer.TokenInfo tokenInfo, @Nullable Activity activity, @Nullable MppActivateListener listener) Activates token using TSP and returns back to the Google Wallet.- Parameters:
tokenInfo- TokenInfo object's instance.activity- Token activation activity.listener- The listener asMppActivateListenerinterface.
-
activate
public static void activate(@NonNull String tokenUniqueReference, @NonNull MppPaymentNetwork paymentNetwork) throws MppException Activates using TSP.- Parameters:
tokenUniqueReference- Token Unique Reference, correspond to the token ID in TSP.paymentNetwork- Payment network- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.NetworkOnMainThreadException- Method should not be called on the Main thread.
-
activate
public static void activate(@NonNull String tokenUniqueReference, @NonNull MppPaymentNetwork paymentNetwork, MppActivateListener listener) Activates using TSP.- Parameters:
tokenUniqueReference- Token Unique Reference, correspond to the token ID in TSP.paymentNetwork- Payment networklistener- The listener asMppActivateListenerinterface.
-
isTokenized
public static void isTokenized(@NonNull String tokenId, @NonNull String issuerName, @NonNull MppPaymentNetwork paymentNetwork, @NonNull GooglePayIsTokenizedListener listener) throws MppException Checks if card is tokenized- Parameters:
tokenId- Token IdissuerName- Issuer NamepaymentNetwork- Card payment networklistener- The listener asGooglePayIsTokenizedListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
viewToken
public static void viewToken(@NonNull String tokenId, @NonNull MppPaymentNetwork paymentNetwork, @NonNull GooglePayPendingIntentListener listener) throws MppException Method will only return an intent that have been registered by an app with the same Android package as the caller. These tokens do not necessarily have to be push provisioned by the calling app, but the package must match the package name in the metadata received from the token service provider when created. If you have multiple packages you will only receive a successful response associated with whichever app package you are calling with.- Parameters:
tokenId- Token IdpaymentNetwork- Card payment networklistener- The listener asGooglePayIsTokenizedListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
getRegisteredTokens
public static void getRegisteredTokens(@NonNull GooglePayRegisteredTokensListener listener) throws MppException Get a list of tokens and associated metadata registered to the active wallet.- Parameters:
listener- The listener asGooglePayRegisteredTokensListenerinterface.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
getTokens
public static MppGetTokensResponseData getTokens(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @NonNull Context context) throws MppException, NetworkOnMainThreadException Get Google Pay tokens for the specified card. Synchronous method.- Parameters:
cardData- Card data object containing the card information.walletId- Wallet ID of the active wallet.deviceId- Device ID of the active wallet.context- Application context.- Returns:
- Returns data containing card payment network, last four digits and related tokens.
- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.NetworkOnMainThreadException- Method should not be called on the Main thread.
-
getTokens
public static void getTokens(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @NonNull Context context, @NonNull MppGetTokensListener listener) Get Google Pay tokens for the specified card. Asynchronous method.- Parameters:
cardData- Card data object containing the card information.walletId- Wallet ID of the active wallet.deviceId- Device ID of the active wallet.context- Application context.listener- The listener asMppGetTokensListenerinterface.
-
getTokenizationData
public static MppGetOemTokenizationDataResponseData getTokenizationData(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @NonNull Context context) throws MppException, NetworkOnMainThreadException Get Google Pay Push Provisioning tokenization data which includes Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.- Parameters:
cardData- Card data object containing the card information.walletId- Wallet ID of the active wallet.deviceId- Device ID of the active wallet.context- Application context.- Returns:
- return Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.
- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.NetworkOnMainThreadException- Method should not be called on the Main thread.
-
getTokenizationData
public static MppGetOemTokenizationDataResponseData getTokenizationData(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @Nullable String serverSessionId, boolean googleOpaquePaymentCardRequested, @NonNull Context context) throws MppException, NetworkOnMainThreadException Get Google Pay Push Provisioning tokenization data which includes Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.- Parameters:
cardData- Card data object containing the card information.walletId- Wallet ID of the active wallet.deviceId- Device ID of the active wallet.context- Application context.- Returns:
- return Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.
- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.NetworkOnMainThreadException- Method should not be called on the Main thread.
-
getTokenizationData
public static void getTokenizationData(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @NonNull Context context, @NonNull MppGetOemTokenizationDataListener listener) Get Google Pay Push Provisioning tokenization data. In listener onSuccess() callback return Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.- Parameters:
cardData- Card data object containing the card information.walletId- Wallet ID of the active wallet.deviceId- Device ID of the active wallet.context- Application context.listener- The listener asMppGetOemTokenizationDataListenerinterface.
-
getTokenizationData
public static void getTokenizationData(@NonNull MppCardDataParameters cardData, @Nullable String walletId, @Nullable String deviceId, @Nullable String serverSessionId, boolean googleOpaquePaymentCardRequested, @NonNull Context context, @NonNull MppGetOemTokenizationDataListener listener) Get Google Pay Push Provisioning tokenization data. In listener onSuccess() callback return Opaque Payment Card (OPC) - a binary blob of information which needs to be shared with Google Pay 'as is' and will be presented to TSP to receive a token.- Parameters:
cardData- Card data object containing the card information.walletId- Wallet ID of the active wallet.deviceId- Device ID of the active wallet.context- Application context.listener- The listener asMppGetOemTokenizationDataListenerinterface.
-
registerDataChangedListener
public static void registerDataChangedListener(@NonNull GooglePayDataChangedListener listener) throws MppException Registers Google Pay wallet data changed listener. Issuer app callback is called immediately whenever the following events occur: - The active wallet changes (by changing the active account) - The selected card of the active wallet changes - Tokenized cards are added or removed from the active wallet - The status of a token in the active wallet changes - Registering for these broadcasts allows an issuer app to re-query information about their digitized cards whenever the user makes a change.- Parameters:
listener- Listener.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
removeDataChangedListener
public static void removeDataChangedListener(@NonNull GooglePayDataChangedListener listener) throws MppException Removes Google Pay wallet data changed listener.- Parameters:
listener- Listener.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
requestTokenDeleteDialog
public static void requestTokenDeleteDialog(@NonNull Activity activity, @NonNull GooglePayTokenInfo googlePayTokenInfo, @NonNull GooglePayTokenDeleteListener listener) throws MppException Shows a dialog asking the user to confirm the deletion of the passed Google Pay token from the Google Pay Wallet.- Parameters:
activity- Activity instance to be used for Dialog.googlePayTokenInfo- Object describing card token added to the Google Pay Wallet.listener- The listener asGooglePayTokenDeleteListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
requestTokenSelectDialog
public static void requestTokenSelectDialog(@NonNull Activity activity, @NonNull GooglePayTokenInfo googlePayTokenInfo, @NonNull GooglePayTokenSelectListener listener) throws MppException Shows a dialog asking the user to confirm the intention to set the passed Google Pay token as their Default card in Google Pay Wallet.- Parameters:
activity- Activity instance to be used for Dialog.googlePayTokenInfo- Object describing card token added to the Google Pay Wallet.listener- The listener asGooglePayTokenSelectListenerinstance.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
isPushCardRequestCode
Deprecated.Should not be used anymore,handleOnActivityResult(int, int, Intent, Activity)method returns a boolean flag showing whether data are handled by MPP SDK or not.Checks result code of Activity.onActivityResult(int, int, Intent) to detect if received results needs to be handled by thehandlePushCardOnActivityResult(int, int, Intent, Activity)method.- Parameters:
requestCode- Request code received as a parameter from Activity.onActivityResult(int, int, Intent) method.- Returns:
- true if results needs to be passed to the
handlePushCardOnActivityResult(int, int, Intent, Activity)method. - Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
handlePushCardOnActivityResult
@Deprecated public static void handlePushCardOnActivityResult(int requestCode, int resultCode, @Nullable Intent intent, @NonNull Activity activity) throws MppException Deprecated.Should not be used anymore, usehandleOnActivityResult(int, int, Intent, Activity)instead.Handles intermediate results returned by Activity.onActivityResult(int, int, Intent) method as a result ofpushCard(MppCardDataParameters, String, UserAddress, Activity, MppPushCardToGooglePayListener)method call.- Parameters:
requestCode- Request code received as a parameter from Activity.onActivityResult(int, int, Intent) method.resultCode- Result code received as a parameter from Activity.onActivityResult(int, int, Intent) method.intent- Result intent received as a parameter from Activity.onActivityResult(int, int, Intent) method.activity- Activity which received result from Activity.onActivityResult(int, int, Intent) method.- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
handleOnActivityResult
public static boolean handleOnActivityResult(int requestCode, int resultCode, @Nullable Intent intent, @NonNull Activity activity) throws MppException Handles intermediate results returned by Activity.onActivityResult(int, int, Intent) method as a result of method calls from MPP SDK related to the Google Pay.- Parameters:
requestCode- Request code received as a parameter from Activity.onActivityResult(int, int, Intent) method.resultCode- Result code received as a parameter from Activity.onActivityResult(int, int, Intent) method.intent- Result intent received as a parameter from Activity.onActivityResult(int, int, Intent) method.activity- Activity which received result from Activity.onActivityResult(int, int, Intent) method.- Returns:
- true if requestCode is handled by MPP SDK, false otherwise
- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
isDefaultPaymentApplication
Issuer app should check if Google Pay is the default NFC payment app after card tokenization. This will ensure that the users who provision a token will be able to use it in Google Pay.- Parameters:
context- Context needed for check.- Returns:
- true if Google Pay is the default application for contactless, false otherwise
- Throws:
MppException- UseMppException.getMppError()()} to get error object with error code and error description.
-
setAsDefaultPaymentApplication
Set Google Pay as a default app for NFC payments.- Parameters:
activity- Activity to be used forActivity.startActivityForResult(Intent, int)call.requestCode- a request code value to be passed intoActivity.startActivityForResult(Intent, int)call.
-
sendUserToGooglePay
Helper method to send user to the Google Pay app to see the tokenized card.- Parameters:
activity- Activity to be used for launching Google Pay app.
-
isWalletAvailable
Checks if Google Wallet is installed on device.- Parameters:
context- Application context.- Returns:
- true Google Wallet is installed on device, false otherwise.
- Throws:
MppException- UseMppException.getMppError()to get error object with error code and error description.
-
handleOnActivityResult(int, int, Intent, Activity)instead.