SafeCharge

SafeCharge is 3DS 2.0 only

Activate the SafeCharge gateway tile

Enter SafeCharge credentials on your account

3DS processing requires browser data be passed on the initial order/import API call. Review this example of one method to send browserData parameter.

browserData input to be added to checkout page:
<input type="hidden" name="browserData" value="" id="browserData">

Script to get browserData:
<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>

Last updated