Some payment card transactions require the cardholder to pass a 3D Secure challenge. We provide the means to achieve this in the Job flow.
3D Secure is the generic name for payment card security programmes called:
Verified by Visa
MasterCard SecureCode
American Express SafeKey
When we detect the 3D Secure challenge, the state of the Job changes to awaitingTds. The activeTdsId field of the Job object contains the identifier of an object which represents the 3D Secure process details.
You will need to retrieve a 3d-secure object and display the challenge to your user, so that they can complete the 3D Secure step.
The url from the 3d-secure object is the URL you should display to your user. The content loaded by this URL is the original, unmediated 3D Secure challenge form from the card issuer. It is the same as if your user were completing their transaction themselves.
Present the URL in an <iframe> surrounded by your branding.
// Get 3d-secure object from Automation Cloudconst tds =await AutomationCloud.get3DSecure(tdsId);// => { object, id, url }// Show 3D Secure form to userconst tdsIframe = document.createElement('iframe');
tdsIframe.setAttribute('src', tds.url);
window.document.getElementById('tds-iframe').appendChild(iframe);
1 2 3 4 5 6 7 8
When your user submits the final step on the 3D Secure form, the parent window on your website receives a 3dsecure-finished message.
// Continue after 3D Secure form is completed
window.addEventListener('message',event=>{if(event.data ==='3dsecure-finished'){// We are done with 3D Secure!
console.log('3D Secure form closed.');}});