The afterRedirect callback is invoked when the browser returns to the merchant page after a redirect to a third-party site. If the beforeRedirect callback was used, the value returned from that callback will be passed to afterRedirect as an argument.
Payment method such as PayPal requires the browser to be redirected away from a merchant page.
The afterRedirect callback must be defined using the data-afterRedirect
attribute on the Checkout
script tag. The attribute value must be the name of a global function.
<html> <head> <script src="https://na.gateway.mastercard.com/checkout/version/24/checkout.js" data-afterRedirect="restorePageState"></script> <script type="text/javascript"> function restorePageState(data) { //set page state from data object } </script> </head> ... </html>
None