Interface TSHProxy
-
public interface TSHProxyTSHProxy is an interface which declares the list of APIs required from TSH server, used by Issuer App.- Since:
- 1.0
- Version:
- 1.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCard(CardInfo cardInfo, String publicKeyId, boolean tcsAccepted, CallbackObject callbackObject, String pushHandler, TPCSDKListener<String> listener)New API to replace deprecated API on PushProvisioning.voidaddCardToClick2PayMC(Click2PayUserDetails userDetails, String encryptedPayload, String authorizationCode, String publicKeyID, String privacyURL, String tncURL, TPCSDKListener<Void> listener)This Api helps to add Mastercard to click to pay token requestor.voidgetAsset(String assetId, TPCSDKListener<MediaData[]> listener)TSH server request to fetch the token requestor logo or image.voidgetCardArt(String cardId, String kyc, String size, TPCSDKListener<MediaData> listener)This Api requests the TSH server to get card art or image for a given funding card.voidgetCardList(String authorizationCode, String kyc, String stock, DeviceInfo deviceInfo, TPCSDKListener<Card[]> listener)TSH server request is used to retrieve the list of cards for given user.voidgetEligibleTokenRequestors(String scheme, String encryptedPayload, String publicKeyId, TPCSDKListener<TokenRequestor[]> listener)Issuer app can use this API to get the list eligible token requestors.voidgetPayload(String authCode, String kyc, String cardId, TPCSDKListener<String> listener)This TSH server request returns encrypted card payload which is required for push provisioning.voidgetTokenList(CardInfo cardInfo, TPCSDKListener<Token[]> listener)This request is used to retrieve list of tokens for a given funding card and token requestor information which gives an overview to user about where cards are digitized like state of the token, the logo, name and type of the token requestor.voidupdateTokenState(String tokenId, String tokenRequestorId, String scheme, String authorizationCode, TokenAction action, TPCSDKListener<Boolean> listener)Request to update or change the token Status.
-
-
-
Method Detail
-
getAsset
void getAsset(String assetId, TPCSDKListener<MediaData[]> listener)
TSH server request to fetch the token requestor logo or image. Returns Base64 encoded image data if found in TSH server. Use getAsset Api only when the provided scheme is MASTERCARD by passing the logoId param. For VISA scheme, the application needs fetch the logo directly using URL.- Parameters:
assetId- Asset unique identifier is mandatory.listener-TPCSDKListenercallback to pass result to caller.
-
getTokenList
void getTokenList(CardInfo cardInfo, TPCSDKListener<Token[]> listener)
This request is used to retrieve list of tokens for a given funding card and token requestor information which gives an overview to user about where cards are digitized like state of the token, the logo, name and type of the token requestor. Note: The list of token providesToken.isOnCurrentDevice()to identify the tokens on the current device which is configured with GooglePay or SamsungPay.- Parameters:
cardInfo-CardInfocard info for which token list requested. Issuer application should pass cardInfo object with following mandatory fieldsschemeandencryptedPayloadrequired for this request.listener-TPCSDKListenercallback is used to return the token array result.
-
getPayload
void getPayload(String authCode, String kyc, String cardId, TPCSDKListener<String> listener)
This TSH server request returns encrypted card payload which is required for push provisioning. The application calls this Api to retrieve encrypted payload before calling the push tokenize Api for a given card.- Parameters:
authCode- Auth code provided by issuer is mandatory field.kyc- Information provided to identify the user is mandatory field.cardId- Unique id of the card allocated by issuer is mandatory.listener-TPCSDKListenerMandatory callback used return the payload.
-
getCardArt
void getCardArt(String cardId, String kyc, String size, TPCSDKListener<MediaData> listener)
This Api requests the TSH server to get card art or image for a given funding card. The image is Base64-encoded data. The issuer application can call this Api to get the card image associated with given cardId and display in application UI.- Parameters:
cardId- Mandatory Unique id of the card allocated by issuer.kyc- Mandatory Information provided to identify the user.size- Mandatory requested image size, ex : S, M, L.listener-TPCSDKListenerMandatory callback to return the MediaData.
-
getCardList
void getCardList(String authorizationCode, String kyc, String stock, DeviceInfo deviceInfo, TPCSDKListener<Card[]> listener)
TSH server request is used to retrieve the list of cards for given user. The issuer application can call this Api to display the list of cards available for the current user.- Parameters:
authorizationCode- Authorization code provided by issuer is mandatory param.kyc- Information provided to identify the user is mandatory param.stock- Additional information provided to identify the user.deviceInfo-DeviceInfoDevice information is mandatory param.listener-TPCSDKListenerMandatory listener used to send the results to caller.
-
updateTokenState
void updateTokenState(String tokenId, String tokenRequestorId, String scheme, String authorizationCode, TokenAction action, TPCSDKListener<Boolean> listener)
Request to update or change the token Status. This Api can be used to perform one of the following actions for a given tokenId like- Activate the token
- Suspend the token
- Delete the token
- Parameters:
authorizationCode- Authorization code provided by issuer.scheme- Enumeration of primary card scheme. Allowed values: VISA, MASTERCARD, PAGOBANCOMAT and AMEX.tokenRequestorId- Unique identifier of the token requestor allocated by the TSP Scheme. It shall be provided for VISA scheme.action- This param is mandatory and indicates operation to be performed like SUSPEND/RESUME/DELETE a token.tokenId- The unique identifier of the token allocated by TSP scheme.listener-TPCSDKListenerMandatory callback used to send the results to caller.
-
getEligibleTokenRequestors
void getEligibleTokenRequestors(String scheme, String encryptedPayload, String publicKeyId, TPCSDKListener<TokenRequestor[]> listener)
Issuer app can use this API to get the list eligible token requestors.- Parameters:
scheme- Card scheme is a mandatory field.encryptedPayload- This parameter is the hexadecimal string representation of an encrypted payload under TSH public key and is mandatory field.publicKeyId- Param represents identifier of the key used to encrypt payload.listener-TPCSDKListenerMandatory callback used to send the results to caller.- Since:
- 1.2.0
-
addCard
void addCard(CardInfo cardInfo, String publicKeyId, boolean tcsAccepted, CallbackObject callbackObject, String pushHandler, TPCSDKListener<String> listener)
New API to replace deprecated API on PushProvisioning. 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.10.0
-
addCardToClick2PayMC
void addCardToClick2PayMC(@NonNull Click2PayUserDetails userDetails, @NonNull String encryptedPayload, @NonNull String authorizationCode, @NonNull String publicKeyID, @NonNull String privacyURL, @NonNull String tncURL, @NonNull TPCSDKListener<Void> listener)
This Api helps to add Mastercard to click to pay token requestor.- Parameters:
userDetails-Click2PayUserDetailsConsumer info object initialized with user inputs for first name, last name, locale, phone number, country code and email.encryptedPayload- This parameter is the hexadecimal string representation of an encrypted payload for MasterCard click to pay, including fpan and expauthorizationCode- Authorization code provided by issuer.publicKeyID- Param represents identifier of the key used to encrypt payload.privacyURL- URL container for Consumer's privacy consent status.tncURL- URL container for Consumer's Terms and Conditions consent status.listener-TPCSDKListenercallbackObject to return the success or failure results.Possible error returned by this API:
TPCSDKExceptionType.TPC_SDK_MISSING_PARAM when userDetails, encryptedPayload, authorizationCode, publicKeyID, privacyURL or tncURL is null or empty.
TPCSDKExceptionType.TPC_SDK_BAD_PARAM when any format of the parameters for userDetails is not correct.
- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server.
- Since:
- 1.10.0
-
-