Versions Compared

Key

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

...

If using challenge (native) 3DS, be sure to implement proper handling on the checkout page

Basic 3DS Instructions

3DS requires that certain browser information be included on the Import Order API call:

  • Add a hidden input for browserData

Code Block
<input type="hidden" name="browserData" value="" id="browserData">
  • Add below script before closing “body” tag.

Code Block
<script type="text/javascript">
    const navigator = window.navigator;
    const browserData = {
        acceptHeader: 'application/json',
        userAgent: navigator.userAgent,
        language: navigator.language,
        timezone: (new Date()).getTimezoneOffset().toString(),
        colorDepth: screen.colorDepth,
        screen: {
            height: screen.height.toString(),
            width: screen.width.toString()
        },
        javaScriptEnabled: true,
        javaEnabled: navigator.javaEnabled()
    };
    document.getElementById('browserData').value = JSON.stringify(browserData);
</script>