Versions Compared

Key

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

...

Code Block
languagexml
titleinit3DSMethod 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 Method with Timeout - Example</title>
</head>
<body>
<div id="methodFrameWithTimeout"></div>
  
<script type="text/javascript">
    const methodContainer = document.getElementById('methodFrameWithTimeout');
     
    // 3DS Method with 10 second timeout
    nca3DSWebSDK.createIframeAndInit3DSMethod(
        'http://example.com/3dsmethod',
        'base64-encoded-3dsmethod-request',
        'methodIFrameTimeout',
        methodContainer,
        () => {
            console.log('3DS Method completed successfully');
        },
        10, // 10 second timeout
        () => {
            console.log('3DS Method timed out after 10 seconds');
        }
    );
</script>
  
</body>
</html>

Пример вызова init3DSChallengeRequest

Code Block
languagexml
titleinit3DSChallengeRequest
<!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 - Example</title>
</head>
<body>
<!-- This example will show how to initiate Challenge Reqeuests for different window sizes. -->
<div id="frameContainer05"></div>
  
<script type="text/javascript">
    container05 = document.getElementById('frameContainer05');
  
    nca3DSWebSDK.createIFrameAndInit3DSChallengeRequest(
        'http://localhost:8080/acs/challenge',
        'base64-encoded-challenge-request',
        '05',
        'threeDSCReq05',
        container05,
        () => {
            console.log('Iframe loaded, form created and submitted');
        }
    );
</script>
  
</body>
</html>

Пример вызова init3DSChallengeRequest с обработкой тайм-аута

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>

Наверх