Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

init3DSChallengeRequest with Timeout - Example

Code Block
languagexml
titleinit3DSChallengeRequest with Timeout
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="nca-3ds-web-sdk.js" type="text/javascript"></script>
    <title>Init 3DS Challenge Request with Timeout - Example</title>
</head>
<body>
<div id="challengeFrameWithTimeout"></div>
  
<script type="text/javascript">
    const challengeContainer = document.getElementById('challengeFrameWithTimeout');
     
    // 3DS Challenge with 60 second timeout
    nca3DSWebSDK.createIFrameAndInit3DSChallengeRequest(
        'http://localhost:8080/acs/challenge',
        'base64-encoded-challenge-request',
         '03',
        'challengeIFrameTimeout',
        challengeContainer,
        () => {
            console.log('Challenge authentication completed successfully');
        },
        60, // 60 second timeout
        () => {
            console.log('Challenge authentication timed out after 60 seconds');
        }
    );
</script>
  
</body>
</html>

To implement 3-D Secure authentication methods on merchant pages, you can use a ready-made SDK.

Back on top