Client-Side Integration (Non-iFields)
This is the Non-iFields Client-Side Integration document for 3D Secure 2.0.
For the iFields client-side 3DS 2.0 integration, refer to iFields
Configuration Properties
The javascript object exposes the following properties:
Methods
Implementation Steps
Import the Library
Add two JS file references to your web page in your page header:
Create JavaScript handler for verification
When a 3DS 2.0 step-up authentication flow occurs, you must handle this by sending the verification results to the payment gateway. Create a JavaScript function on your page to do this. The ck3DS object will call this function automatically when a step-up verification completes. The function will receive the verification results as input parameters.
The order of parameters is as shown in the following code sample:
Configure the 3DS object
In your page load, add the initialization code:
Add 3DS profiling and submit results with the initial payment request
In the form submit handler, before submitting the payment, add the 3DS values to the data to be sent on to the gateway, using whatever submit mechanism is being used on your page. For example, the code below sets the hidden fields on the page to the corresponding values and then submits the form:
Handle 3DS Challenge
Modify the above code (line 15 in the sample snippet above) to correctly handle the server response. If the response from Cardknox had a status of V / Verify, call the verifyTrans
function. The parameters this function needs are returned as part of the gateway response object and should just be passed along:
When 3DS verification is complete, the onVerifyComplete
handler (created in step 2 and "hooked up" in step 3) will be called with the response fields that should be passed to your server.
Last updated