Interface Transaction
-
- All Implemented Interfaces:
public interface TransactionAn object that implements the Transaction interface shall hold parameters that the 3DS Server requires to create AReq messages and to perform the Challenge Flow.
-
-
Method Summary
Modifier and Type Method Description abstract StandaloneResult<AuthenticationRequestParameters, AuthenticationError>getAuthenticationRequestParameters()When the 3DS Requester App calls the getAuthenticationRequestParameters method, the 3DS SDK shall encrypt the device information that it collects during initialization and send this information along with the SDK information to the 3DS Requester App. abstract UnitdoChallenge(Activity activity, ChallengeParameters challengeParameters, AuthenticationCallback callback)If the ARes that is returned indicates that the Challenge Flow must be applied, the 3DS Requester App calls the doChallenge method with the required input parameters. abstract Unitclose()The close method is called to clean up resources that are held by the Transaction object. -
-
Method Detail
-
getAuthenticationRequestParameters
abstract StandaloneResult<AuthenticationRequestParameters, AuthenticationError> getAuthenticationRequestParameters()
When the 3DS Requester App calls the getAuthenticationRequestParameters method, the 3DS SDK shall encrypt the device information that it collects during initialization and send this information along with the SDK information to the 3DS Requester App. The app includes this information in its message to the 3DS Server.
The 3DS SDK encrypts the device information by using the DS public key. This key is identified based on the directoryServerID that is passed to the createTransaction method. The 3DS SDK can use A128CBC-HS256 or A128GCM as the encryption algorithm. For more information about 3DS SDK encryption, refer to Section 6.2.2, "Function I: 3DS SDK Encryption to DS" in the EMV 3DS Protocol Specification.
The 3DS SDK shall generate an ephemeral key pair that is required for subsequent communication with the ACS if a challenge must be applied. For more information, refer to 3DS SDK – ACS Secure Channel.
The getAuthenticationRequestParameters method shall be called for every transaction.
- Returns:
This method returns on Success an AuthenticationReqParams object that contains device information and 3DS SDK information and on Failure it will return AuthenticationError
-
doChallenge
abstract Unit doChallenge(Activity activity, ChallengeParameters challengeParameters, AuthenticationCallback callback)
If the ARes that is returned indicates that the Challenge Flow must be applied, the 3DS Requester App calls the doChallenge method with the required input parameters. The doChallenge method initiates the challenge process.
<p> Note: The doChallenge method shall be called only when the Challenge Flow is to be applied. <p> When the doChallenge method is called, control of the app is passed to the 3DS SDK.- Parameters:
activity- The Android activity instance that invoked doChallenge.challengeParameters- ACS details (contained in the ARes) required by the 3DS SDK to conduct the challenge process during the transaction.callback- Callback object for notifying the 3DS Requester App about the challenge status.
-
close
abstract Unit close()
The close method is called to clean up resources that are held by the Transaction object. It shall be called when the transaction is completed. Note: This method is required to be called only when the doChallenge method is not called in the transaction. The following are some examples of scenarios in which the close method is called:
Frictionless transaction.
The ACS recommends a challenge, but the Merchant overrides the recommendation and chooses to complete the transaction without a challenge.
-
-
-
-