Package com.netcetera.threeds.sdk.api
Interface ThreeDS2Service
public interface ThreeDS2Service
Provides methods to process transactions.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface3DS SDK Initialization Callback. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup(android.content.Context applicationContext) The cleanup method frees up resources that are used by the 3DS SDK.createTransaction(String directoryServerID, String messageVersion) Creates an instance of Transaction through which the 3DS Requestor App gets the data that is required to perform the transaction.createTransaction(String directoryServerID, String messageVersion, Map<String, String> additionalParameters) Creates an instance of Transaction through which the 3DS Requestor App gets the data that is required to perform the transaction.Provides information of the current configuration with which the 3DS SDK operates.Returns warnings produced by the 3DS SDK while performing security checks during initialization.voidinitialize(android.content.Context applicationContext, ConfigParameters configParameters, String locale, UiCustomization uiCustomization) Deprecated.This is no longer supported since EMVCo Specification 2.3.1.voidinitialize(android.content.Context applicationContext, ConfigParameters configParameters, String locale, Map<UiCustomization.UiCustomizationType, UiCustomization> uiCustomizationMap) The 3DS requester App calls the initialize method at the start of the payment stage of a transaction.voidinitialize(android.content.Context applicationContext, ConfigParameters configParameters, String locale, Map<UiCustomization.UiCustomizationType, UiCustomization> uiCustomizationMap, ThreeDS2Service.InitializationCallback initializationCallback) The 3DS requester App calls the initialize method at the start of the payment stage of a transaction.
-
Method Details
-
initialize
@Deprecated void initialize(android.content.Context applicationContext, ConfigParameters configParameters, String locale, UiCustomization uiCustomization) throws InvalidInputException, SDKAlreadyInitializedException, SDKRuntimeException Deprecated.This is no longer supported since EMVCo Specification 2.3.1. Useinitialize(Context, ConfigParameters, String, Map)instead.The 3DS requester App calls the initialize method at the start of the payment stage of a transaction.IMPORTANT NOTICE:
- This method must be called on a background thread!
- Parameters:
applicationContext-ContextconfigParameters-ConfigParameterslocale-String, example value “en_US”.uiCustomization-UiCustomization- Throws:
InvalidInputException- if invalid input is provided.SDKAlreadyInitializedException- is SDK is already initialized.SDKRuntimeException- if 3DS SDK encounters internal error.
-
initialize
void initialize(android.content.Context applicationContext, ConfigParameters configParameters, String locale, Map<UiCustomization.UiCustomizationType, UiCustomization> uiCustomizationMap) throws InvalidInputException, SDKAlreadyInitializedException, SDKRuntimeExceptionThe 3DS requester App calls the initialize method at the start of the payment stage of a transaction.IMPORTANT NOTICE:
- This method must be called on a background thread!
- Parameters:
applicationContext-ContextconfigParameters-ConfigParameterslocale-String, example value “en_US”.uiCustomizationMap-MapofUiCustomizationidentified byUiCustomization.UiCustomizationType- Throws:
InvalidInputException- if invalid input is provided.SDKAlreadyInitializedException- is SDK is already initialized.SDKRuntimeException- if 3DS SDK encounters internal error.
-
initialize
void initialize(android.content.Context applicationContext, ConfigParameters configParameters, String locale, Map<UiCustomization.UiCustomizationType, UiCustomization> uiCustomizationMap, ThreeDS2Service.InitializationCallback initializationCallback) The 3DS requester App calls the initialize method at the start of the payment stage of a transaction.IMPORTANT NOTICE:
- This method must be called on a background thread!
- Parameters:
applicationContext-ContextconfigParameters-ConfigParameterslocale-String, example value “en_US”.uiCustomizationMap-MapofUiCustomizationidentified byUiCustomization.UiCustomizationTypeinitializationCallback-ThreeDS2Service.InitializationCallback
-
getWarnings
Returns warnings produced by the 3DS SDK while performing security checks during initialization.- Returns:
- List of warnings produced by the 3DS SDK during initialization.
- Throws:
SDKNotInitializedException- if the 3DS SDK is not initialized.
-
getSDKVersion
- Returns:
- the version of the 3DS SDK that is integrated with the 3DS Requester App.
- Throws:
SDKNotInitializedException- if the 3DS SDK is not initialized.SDKRuntimeException- if the SDK experiences internal error while running.
-
getSDKInfo
Provides information of the current configuration with which the 3DS SDK operates.- Returns:
SDKInfo- Throws:
SDKNotInitializedException- if the 3DS SDK is not initialized.SDKRuntimeException- if the SDK experiences internal error while running.
-
cleanup
The cleanup method frees up resources that are used by the 3DS SDK. It is called only once during a single 3DS Requester App session.- Parameters:
applicationContext-Context- Throws:
SDKNotInitializedException- if SDK is not initialized.
-
createTransaction
Transaction createTransaction(String directoryServerID, String messageVersion) throws InvalidInputException, SDKNotInitializedException, SDKRuntimeException Creates an instance of Transaction through which the 3DS Requestor App gets the data that is required to perform the transaction.- Parameters:
directoryServerID- Registered Application Provider Identifier (RID) that is unique to the Payment System.messageVersion- Protocol version according to which the transaction shall be created.- Returns:
- the instance of the
Transactioninterface. - Throws:
InvalidInputException- if an input parameter is invalid.SDKNotInitializedException- if SDK is not initialized.SDKRuntimeException- if an internal error is encountered by the 3DS SDK.
-
createTransaction
Transaction createTransaction(String directoryServerID, String messageVersion, Map<String, String> additionalParameters) throws InvalidInputException, SDKNotInitializedException, SDKRuntimeExceptionCreates an instance of Transaction through which the 3DS Requestor App gets the data that is required to perform the transaction.- Parameters:
directoryServerID- Registered Application Provider Identifier (RID) that is unique to the Payment System.messageVersion- Protocol version according to which the transaction shall be created.additionalParameters- Additional parameters with which theTransactionshould be created. For future use.- Returns:
- the instance of the
Transactioninterface. - Throws:
InvalidInputException- if an input parameter is invalid.SDKNotInitializedException- if SDK is not initialized.SDKRuntimeException- if an internal error is encountered by the 3DS SDK.
-