public interface ThreeDS2Service
Use INSTANCE
to get the ThreeDS2Service instance.
Created by Ran Haveshush on 24/08/2018.
Modifier and Type | Field and Description |
---|---|
static ThreeDS2Service |
INSTANCE
The
ThreeDS2Service instance. |
Modifier and Type | Method and Description |
---|---|
void |
cleanup(android.content.Context applicationContext)
Frees up resources that are used by the 3DS SDK.
|
Transaction |
createTransaction(java.lang.String directoryServerID,
java.lang.String messageVersion)
Creates an instance of
Transaction through which the App gets the data required to perform the transaction.The App shall call this method for each transaction that is to be processed. |
java.lang.String |
getSDKVersion()
Returns the version of the 3DS SDK that is integrated with the App.
|
java.util.List<Warning> |
getWarnings()
Returns the security checks warnings produced by the 3DS SDK during initialization.
|
void |
initialize(android.content.Context applicationContext,
ConfigParameters configParameters,
java.lang.String locale,
UiCustomization uiCustomization)
Initializes the 3DS SDK service instance.
|
static final ThreeDS2Service INSTANCE
ThreeDS2Service
instance.void initialize(android.content.Context applicationContext, ConfigParameters configParameters, java.lang.String locale, UiCustomization uiCustomization) throws InvalidInputException, SDKAlreadyInitializedException, SDKRuntimeException
Note: Until the ThreeDS2Service
instance is initialized, it will be unusable.
During initialization the following tasks are performed:
getWarnings()
.
ThreeDS2Service
shall be initialized
as a background task either during the App startup or when a transaction is initiated.
The state of the instance is maintained until the cleanup(android.content.Context)
method is called.applicationContext
- An instance of Android Application
context.configParameters
- The ConfigParameters
, configuration information that shall be used during initialization.locale
- (optional) A String
that represents the app’s user interface locale (e.g. "en_US").
If set to null
, then the default device locale will be used.uiCustomization
- (optional) The UiCustomization
, UI configuration information that is used to specify the UI layout and theme.
If set to null
, then the default app's theme will be used.InvalidInputException
- This exception will be thrown in any of the following scenarios:
SDKAlreadyInitializedException
- This exception will be thrown if the 3DS SDK instance has already been initialized.SDKRuntimeException
- This exception will be thrown if an internal error is encountered by the 3DS SDK.Transaction createTransaction(java.lang.String directoryServerID, java.lang.String messageVersion) throws InvalidInputException, SDKNotInitializedException, SDKRuntimeException
Transaction
through which the App gets the data required to perform the transaction.directoryServerID
- The Registered Application Provider Identifier (RID) that is unique to the Payment System.messageVersion
- The Protocol version according to which the transaction shall be created.Transaction
interface.InvalidInputException
- This exception will be thrown if an input parameter is invalid. This also includes an invalid Directory
Server ID
or a protocol version that the 3DS SDK does not support.SDKNotInitializedException
- This exception will be thrown if the 3DS SDK instance has not been initialized.SDKRuntimeException
- This exception will be thrown if an internal error is encountered by the 3DS SDK.void cleanup(android.content.Context applicationContext) throws SDKNotInitializedException
applicationContext
- An instance of Android Application
context.SDKNotInitializedException
- This exception will be thrown if the 3DS SDK instance has not been initialized.java.lang.String getSDKVersion()