Introduction
Agreement
Authentication
Batch
Browser Payment
Gateway
Hosted Checkout
Payment Plan
Session
Tokenization
Transaction
Wallet
RESOURCES
Changelog
Checkout
complete
complete Callback
The complete callback will be invoked when the payment has been completed.
Usage Copied to clipboard
The complete callback must be defined using the data-complete
attribute on the Checkout
script tag. The attribute value may be the name of a global function or a URL string. URLs will have a
query parameter appended for each argument.
The complete callback is only supported in a Return To Merchant integration.
Example Copied to clipboard
<html> <head> <script src="https://evopaymentsmexico.gateway.mastercard.com/static/checkout/checkout.min.js" data-complete="completeCallback"> </script> <script type="text/javascript"> function completeCallback(response) { console.log ('response: ', response); console.log ('resultIndicator: ', response.resultIndicator); console.log ('sessionVersion: ', response.sessionVersion); } </script> </head> ... </html>
<html> <head> <script src="https://evopaymentsmexico.gateway.mastercard.com/static/checkout/checkout.min.js" data-complete="http://[your domain]/receiptPage"></script> </head> ... </html>
Arguments Copied to clipboard
response
Copied to clipboard
Object
Response Details.
resultIndicator
Copied to clipboard
String
The result indicator can be used to securely determine if the payment succeeded in a Return To Merchant integration.
sessionVersion
Copied to clipboard
String
Version of the Payment Session after payment completed.
Return Value Copied to clipboard
None