Class PushProvisioning<T>
- java.lang.Object
-
- com.thalesgroup.tpcsdk.provisioning.PushProvisioning<T>
-
public abstract class PushProvisioning<T> extends Object
Generic parameterized PushProvisioning is an interface which enforce push provisioning operations to be implemented by OEM typeOEMPayTypeThe key functions this interface provides are isCardDigitized and addCard to OEM wallets like Google Pay or Samsung Pay- Since:
- 1.0
- Version:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description PushProvisioning()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidactivateCardWithIdv(CardInfo cardInfo, String tokenReferenceId, TPCSDKListener<CardDigitizationStatus> listener)This API is to resume ID&V step for those cards with which, digitization is initialized but ID&V step isn't completed.voidactivateSamsungPay()An utility function to bring the Samsung Pay app to a state in which cards can be added.voidaddCard(Activity activity, CardInfo cardInfo, TPCSDKListener<T> listener)This Api helps to add card for Google PayOEMPayType.GOOGLE_PAYwallet.voidaddCard(CardInfo cardInfo, TPCSDKListener<T> listener)This Api helps to add card in selectedOEMPayTypewallet.voidaddCard(CardInfo cardInfo, String publicKeyId, boolean tcsAccepted, CallbackObject callbackObject, String pushHandler, TPCSDKListener<String> listener)Deprecated.voidgetToken(GetTokenInput input, TPCSDKListener<Token> listener)This method is used to retrieve respective digital token from any of the supported OEM wallets.voidhandleWalletResult(int requestCode, int resultCode, Intent data)Handle a callback data that Google Pay is returned toActivity.onActivityResult(int, int, Intent).voidhandleWalletResult(Intent data)Handle a callback data that Huawei Pay Wallet is returned toActivity.onNewIntent(Intent).voidisCardDigitized(CardInfo cardInfo, TPCSDKListener<CardDigitizationStatus> listener)The TPC SDK Api is used to check whether given card is already digitized in any of the supported OEM wallets.voidregisterDataChangedListener(TPCSDKDataChangedListener dataChangedListener)Google Pay Only.voidremoveDataChangedListener()Detach the data changed listener.voidupdateSamsungPay()An utility function to bring a user to update their Samsung Pay app.
-
-
-
Method Detail
-
getToken
public void getToken(GetTokenInput input, TPCSDKListener<Token> listener)
This method is used to retrieve respective digital token from any of the supported OEM wallets. The method is implemented separately for both Google Pay and Samsung Pay wallets accordingly to handle OEM specific flows.Possible error returned by this API:
TPCSDKExceptionType.TPC_SDK_MISSING_PARAMwhenGetTokenInput.getLast4()last4 is null or empty- Google Pay:
TPCSDKExceptionType.TPC_GPAY_UNAVAILABLETPCSDKExceptionType.TPC_GPAY_NO_ACTIVE_WALLETTPCSDKExceptionType.TPC_GPAY_INTERNAL_ERROR- Samsung Pay:
TPCSDKExceptionType.TPC_SPAY_INVALID_SERVICE_IDTPCSDKExceptionType.TPC_SPAY_PARTNER_APP_SIGNATURE_MISMATCHTPCSDKExceptionType.TPC_SPAY_PARTNER_APP_VERSION_NOT_SUPPORTEDTPCSDKExceptionType.TPC_SPAY_INVALID_SERVICE_TYPE- Huawei Pay:
- Not yet supported
TPCSDKExceptionType.TPC_UNSUPPORTED_OPERATION
GetTokenInputObject that holds mandatory 'last4' parameter, which is the last four numbers of the card(FPAN)- Parameters:
listener-TPCSDKListenerThe callback used to return Token or- Since:
- 1.7.0
-
isCardDigitized
public void isCardDigitized(CardInfo cardInfo, TPCSDKListener<CardDigitizationStatus> listener)
The TPC SDK Api is used to check whether given card is already digitized in any of the supported OEM wallets. The method is implemented separately for both Google Pay and Samsung Pay wallets accordingly to handle OEM specific flow.Possible error returned by this API:
TPCSDKExceptionType.TPC_SERVER_MISSING_PARAMwhenCardInfoparameter is null- Google Pay:
- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server TPCSDKExceptionType.TPC_GPAY_UNAVAILABLETPCSDKExceptionType.TPC_GPAY_NO_ACTIVE_WALLET- Samsung Pay:
- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server TPCSDKExceptionType.TPC_SPAY_INVALID_SERVICE_IDTPCSDKExceptionType.TPC_SPAY_PARTNER_APP_SIGNATURE_MISMATCHTPCSDKExceptionType.TPC_SPAY_PARTNER_APP_VERSION_NOT_SUPPORTEDTPCSDKExceptionType.TPC_SPAY_INVALID_SERVICE_TYPE- Huawei Pay:
- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server TPCSDKExceptionType.TPC_HPAY_DEVICE_INFO_ERROR
- Parameters:
cardInfo-CardInfoCard object holds card info required to checklistener-TPCSDKListenerThe callback listener used to return the card status or error
-
addCard
public void addCard(CardInfo cardInfo, TPCSDKListener<T> listener)
This Api helps to add card in selectedOEMPayTypewallet.- Parameters:
cardInfo-CardInfoCard object holds card info required to do push provision.listener-TPCSDKListenerGeneric type parameterized callback to return the respective results.Possible error returned by this API:
TPCSDKExceptionType.TPC_SERVER_MISSING_PARAMwhenCardInfoparameter is null.- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server. - Google Pay:
TPCSDKExceptionType.TPC_GPAY_MISSING_PARAMTPCSDKExceptionType.TPC_GPAY_INTERNAL_ERRORTPCSDKExceptionType.TPC_GPAY_UNAVAILABLETPCSDKExceptionType.TPC_GPAY_NO_ACTIVE_WALLETTPCSDKExceptionType.TPC_INVALID_CARD_SCHEME- Samsung Pay:
TPCSDKExceptionType.TPC_SERVER_MISSING_PARAMwhen Samsung Pay return deviceId or walletId is null or emptyTPCSDKExceptionType.TPC_SPAY_APP_NOT_FOUNDTPCSDKExceptionType.TPC_SPAY_APP_NEED_TO_UPDATETPCSDKExceptionType.TPC_SPAY_APP_SETUP_NOT_COMPLETEDTPCSDKExceptionType.TPC_SPAY_INVALID_SERVICE_IDTPCSDKExceptionType.TPC_SPAY_PARTNER_APP_SIGNATURE_MISMATCHTPCSDKExceptionType.TPC_SPAY_PARTNER_APP_VERSION_NOT_SUPPORTEDTPCSDKExceptionType.TPC_SPAY_INVALID_SERVICE_TYPE- Huawei Pay:
-
addCard
public void addCard(Activity activity, CardInfo cardInfo, TPCSDKListener<T> listener)
This Api helps to add card for Google PayOEMPayType.GOOGLE_PAYwallet. By using this API, TPC SDK initialization does not require Activity.- Parameters:
activity- Activity context.cardInfo-CardInfoCard object holds card info required to do push provision.listener-TPCSDKListenerGeneric type parameterized callback to return the respective results.Possible error returned by this API:
TPCSDKExceptionType.TPC_SERVER_MISSING_PARAMwhenCardInfoparameter is null.- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server. - Google Pay:
- Since:
- 1.9.0
-
addCard
public void addCard(CardInfo cardInfo, String publicKeyId, boolean tcsAccepted, CallbackObject callbackObject, String pushHandler, TPCSDKListener<String> listener)
Deprecated.This Api helps to add card to selected token requestor which is compatible with issuer card and associated payment scheme. On successful results, the Token requestor URL used for redirection is returned.- Parameters:
cardInfo-CardInfoCard object holds card info required to do push provision.publicKeyId- Param represents identifier of the key used to encrypt payload.tcsAccepted- Param value represents whether terms and conditions are accepted by user.callbackObject- Mandatory param contains callbackObject url and platform type information required by Token Requestor app to pass control back to issuer application.pushHandler- token requestor push handler is a mandatory field.listener-TPCSDKListenercallbackObject to return the success or failure results.Possible error returned by this API:
TPCSDKExceptionType.TPC_SERVER_MISSING_PARAM when encryptedPayload, authorizationCode, deviceId, pushHandler, callback url or callback type is null or empty.
- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server
- Since:
- 1.2.0
-
activateCardWithIdv
public void activateCardWithIdv(CardInfo cardInfo, String tokenReferenceId, TPCSDKListener<CardDigitizationStatus> listener)
This API is to resume ID&V step for those cards with which, digitization is initialized but ID&V step isn't completed. Google Pay only.- Parameters:
cardInfo-BaseRequest.getScheme()&UserDetails.getName()should not be empty.tokenReferenceId- received fromCardDigitizationStatus.getTokenReferenceId().listener-TPCSDKListenerGeneric type parameterized callback to return the respective results.Possible error returned by this API:
TPCSDKExceptionType.TPC_SERVER_MISSING_PARAM when cardInfo, name, scheme, or tokenReferenceId is null or empty.
TPCSDKExceptionType.TPC_GPAY_INTERNAL_ERROR
-
handleWalletResult
public void handleWalletResult(int requestCode, int resultCode, Intent data)Handle a callback data that Google Pay is returned toActivity.onActivityResult(int, int, Intent). This function is required to be called duringTPCManager.config(Config, TPCSDKListener)andaddCard(CardInfo, TPCSDKListener)- Parameters:
requestCode- requestCode available for onActivityResultresultCode- resultCode available for onActivityResultdata- data available for onActivityResult- Since:
- 1.2.0
-
handleWalletResult
public void handleWalletResult(Intent data)
Handle a callback data that Huawei Pay Wallet is returned toActivity.onNewIntent(Intent). This function is required to be called onaddCard(CardInfo, TPCSDKListener)- Parameters:
data- data available for onNewIntent- Since:
- 1.3.11
-
registerDataChangedListener
public void registerDataChangedListener(TPCSDKDataChangedListener dataChangedListener)
Google Pay Only. The Push Provisioning API will immediately call an issuer app callback 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
Note: Registering for these broadcasts allows an issuer app to re-query information about their digitized cards whenever the user makes a change.
- Parameters:
dataChangedListener-- Since:
- 1.2.0
-
removeDataChangedListener
public void removeDataChangedListener()
Detach the data changed listener. Google Pay Only.- Since:
- 1.2.0
-
updateSamsungPay
public void updateSamsungPay()
An utility function to bring a user to update their Samsung Pay app. If theaddCard(CardInfo, TPCSDKListener)status isTPCSDKExceptionType.TPC_SPAY_APP_NEED_TO_UPDATE, application can call this API to launch Samsung Pay update page.
-
activateSamsungPay
public void activateSamsungPay()
An utility function to bring the Samsung Pay app to a state in which cards can be added. Samsung Pay might be either in stub only state or Samsung Account is not signed in state. If theaddCard(CardInfo, TPCSDKListener)status isTPCSDKExceptionType.TPC_SPAY_APP_SETUP_NOT_COMPLETED, application can call this API to launch Samsung Pay and user can sign in to the app.
-
-