Page History
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
<!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 - Example</title>
</head>
<body>
<!-- The first example shows how to generate a form and attach to an already defined iframe -->
<iframe name="iframeContainer" id="iframe"></iframe>
<!-- In the second example it will generate an iframe and attach to the #frameContainer element -->
<div id="frameContainer"></div>
<script type="text/javascript">
iframe = document.getElementById('iframe');
frameContainer = document.getElementById('frameContainer');
nca3DSWebSDK.init3DSMethod('http://example.com', 'base64-encoded-3dsmethod-request', iframe);
nca3DSWebSDK.createIframeAndInit3DSMethod(
'http://example.com',
'base64-encoded-3dsmethod-request',
'threeDSMethodIFrameContainer',
frameContainer,
() => {
console.log('Iframe loaded, form created and submitted');
}
);
</script>
</body>
</html> |