Introduction
Agreement
Authentication
Batch
Browser Payment
Gateway
Hosted Checkout
Payment Plan
Session
Standalone Risk Assessment
Tokenization
Transaction
Wallet
RESOURCES
Changelog
Checkout
cancel
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://qnbalahli.test.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://qnbalahli.test.gateway.mastercard.com/static/checkout/checkout.min.js" data-cancel="http://[your domain]/cancelPage"></script> </head> ... </html>
Arguments
None
Return Value
None