Correct authentication via 3-D Secure 2.2 on a merchant's page can be implemented using the SDK.
The 3DSWebSDK is a lightweight JavaScript that allows merchants to easily invoke 3DS Method and Challenge Request messages for browser-based transactions.
<!DOCTYPE html>
<html>
<head>
...
<script src="nca-3ds-web-sdk.js" type="text/javascript" />
...
</head>
<body>
...
</body>
</html>
The script will attach the 3DSWebSDK to the JavaScript window object.
The 3DSWebSDK object contains the following operations:
| Operation | Description |
|---|---|
| init3DSMethod | Creates an HTML structure and attaches a form with a single input (threeDSMethodData) and automatically submits it to the threeDSMethodUrl. |
| createIframeAndInit3DSMethod | Creates an iframe with an HTML structure and attaches a form with a single input (threeDSMethodData) and automatically submits it to the threeDSMethodUrl and attaches the frame to the container. If specified, a callback will be executed when the frame is loaded. Additionally, an optional timeout duration and timeout callback can be specified to handle cases where the ACS does not complete the 3DS Method in time. |