Package com.thalesgroup.tpcsdk.manager
Class TPCManager
- java.lang.Object
-
- com.thalesgroup.tpcsdk.manager.TPCManager
-
public class TPCManager extends Object
TPCManager is entry point for TPC SDK, provides singleton object to call SDK methods TPCManager methods should be used in some sequence to make sure SDK behaves correctly Please refer below sequence of API callsCalling sequence
- TPCManager.config
- Other TPCManager methods
- Since:
- 1.0
- Version:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description TPCManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfig(Config config, TPCSDKListener<Boolean> tpcSdkListener)Method to provides way to configure common data required for processing request likeConfiggetConfig()static TPCManagergetInstance()Method to access TPCManager object referencePushProvisioninggetPushProvisioning()Method returns implementation for different types push provisioning that is depends on theOEMPayTypethat was set on theconfig(Config, TPCSDKListener).PushProvisioninggetPushProvisioning(OEMPayType oemPayType)Method returns implementation for different types push provisioning.TSHProxygetTSHProxy()Method returns implementations for TSH APIs
-
-
-
Method Detail
-
getInstance
public static TPCManager getInstance()
Method to access TPCManager object reference- Returns:
TPCManagerobject reference
-
config
public void config(Config config, TPCSDKListener<Boolean> tpcSdkListener)
Method to provides way to configure common data required for processing request likeOEM Type
- GOOGLE_PAY
- SAMSUNG_PAY
- HUAWEI_PAY
- NONE
Activity - Activity is required if SDK needs to process some UI
Issuer Id - Required for some PNO provisioning, specially for VISA
- Parameters:
config-ConfigThe common data required by SDK.tpcSdkListener-TPCSDKListenercallback used to send the init status to application.Possible error returned by this API:
TPCSDKExceptionType.TPC_SERVER_MISSING_PARAMwhenCardInfoparameter is nullTPCSDKExceptionType.TPC_INIT_FAILED- Google Pay:
- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server. TPCSDKExceptionType.TPC_GPAY_INTERNAL_ERRORTPCSDKExceptionType.TPC_GPAY_UNAVAILABLE- Samsung Pay:
- Any Server or HTTP error in
TPCSDKExceptionTypewhen there's connection or operation issue with server. TPCSDKExceptionType.TPC_SPAY_NOT_SAMSUNG_DEVICETPCSDKExceptionType.TPC_SPAY_INTERNAL_ERRORTPCSDKExceptionType.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:
-
getPushProvisioning
public PushProvisioning getPushProvisioning(OEMPayType oemPayType) throws TPCSDKException
Method returns implementation for different types push provisioning.- Parameters:
oemPayType- Push Provisioning type.- Returns:
PushProvisionreference for pushProvision implementation.- Throws:
TPCSDKException- thrown when issuerId, url or config is null or empty. Only for Push to Scheme.Note: This method need be called after
config(Config, TPCSDKListener)otherwise it will returnsnull.
-
getPushProvisioning
public PushProvisioning getPushProvisioning() throws TPCSDKException
Method returns implementation for different types push provisioning that is depends on theOEMPayTypethat was set on theconfig(Config, TPCSDKListener).- Returns:
PushProvisionreference for pushProvision implementation.- Throws:
TPCSDKException- thrown when issuerId, url or config is null or empty. Only for Push to Scheme.Note: This method need be called after
config(Config, TPCSDKListener). otherwise it will returnsnull.
-
getTSHProxy
public TSHProxy getTSHProxy() throws TPCSDKException
Method returns implementations for TSH APIs- Returns:
TSHProxy- Throws:
TPCSDKException- thrown when url, activity, oemPayType or issuerId is null or empty
-
getConfig
public Config getConfig()
-
-