question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3DS V2 iframe events

See original GitHub issue

General information

  • SDK version: 3.46.0-beta-3ds.8
  • Environment: Sandbox
  • Browser and OS Chrome 75 on Windows 10

Issue description

In the 3DS v1 implementation it was possible to specify addFrame/removeFrame callbacks, allowing us to customize the modal dialog, hosting the banks iframe. These methods are apparently no longer being called as part of V2.

Specifically im looking for ways to:

  • Inline (instead of modal) the content in the page on smaller devices (iphone 5/SE)
  • Add an ‘X’ button in the top-left corner of the modal dialog (same behaviour as cancel)
  • Adjust the height of the frame to avoid vertical scrolling on larger screens
  • Detect when the ‘Cancel’ button has been pressed inside the iframe, to skip sending the nonce which is apparently always generated but with a liabilityshiftpossible = true liabilityshifted = false

Perhaps there is a new way ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
crookedneighborcommented, Sep 25, 2019

We’ve added an undocumented beta feature to use support the inline frame option provided by cardinal. You can try it out like this, by using a framework param instead of version:

braintree.threeDSecure.create({
  client: clientInstance,
  framework: 'inline-iframe'
}, function (createError, threeDSecure) {
  // set up lookup-complete listener
  // you may omit this and continue to use the onLookupComplete callback
  // in the verifyCard instead, if you wish
  threeDSecure.on('lookup-complete', function (data, next) {
    // check lookup data
    next();
  });
  // set up iframe listener
  threeDSecure.on('authentication-iframe-available', function (event, next) {
    var element = event.element; // an html element that contains the iframe

   document.body.appendChild(element); // put it on your page

    next(); // let the sdk know the element has been added to the page
  });

  // collect tokenized credit card
  threeDSecure.verifyCard({
    nonce: nonceFromTokenizationPayload,
    bin: binFromTokenizationPayload,
    amount: '100.00',
    // additional verify card params if available
  }).then(function (payload) {
    // inspect payload
    // send payload.nonce to your server
  });
});

We’re still solidifying the exact API for how to expose this, so keep an eye on the CHANGELOG for breaking changes. We will also keep this open until the feature is out of beta.

2reactions
crookedneighborcommented, Oct 28, 2019

The error you were seeing should be fixed now in the latest release. Going to close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IFrames - to use or not to use - Endeavour 3D Secure
The discussion on the use of iframes is back! Using an iframe to display the challenge windows has always been a popular option....
Read more >
three-d-secure/external/three-d-secure.js - Documentation
dsTransactionId Transaction identifier resulting from 3D Secure 2 authentication. ... @event ThreeDSecure#authentication-iframe-available * @example ...
Read more >
iFrame HTML Guide - Hosted PCI
HostedPCI Express Solution is designed to integrate with any e-commerce site that requires a credit card and CVV information captured. iFrame module is ......
Read more >
What is New with EMV® 3DS v2.3? - EMVCo
3 introduces enhancements to increase flexibility for optimising EMV 3DS implementation across multiple channels and devices, help issuers ...
Read more >
3DS Browser Integration Guide - 3D Secure Integration
The 3DS JavaScript will create a hidden iframe which opens the threeDSMethodURL , hosted by the ACS. The ACS uses JavaScript on this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found