cancel Callback

The cancel callback is invoked when the payer choose to cancel a payment.

Usage

The cancel callback must be defined using the data-cancel attribute on the Checkout script tag. The attribute value may be the name of a global function or a URL string.

Example

<html>
    <head>
        <script src="https://suncorp.gateway.mastercard.com/static/checkout/checkout.min.js"
                data-cancel="cancelCallback"></script>

        <script type="text/javascript">
            function cancelCallback() {
                //handle payment being cancelled
            }
        </script>
    </head>
    ...
</html>
<html>
    <head>
        <script src="https://suncorp.gateway.mastercard.com/static/checkout/checkout.min.js"
                data-cancel="http://[your domain]/cancelPage"></script>
    </head>
    ...
</html>

Arguments

None

Return Value

None

Copyright © 2023 Suncorp