saveFormFields() is a default implementation of a beforeRedirect callback. When used in conjunction with restoreFormFields(), the contents of any input elements on your page can be restored across browser redirects during the payment process.
saveFormFields() can be configured as the beforeRedirect callback using the data-beforeRedirect
attribute on the Checkout
script tag.
<html> <head> <script src="https://na.gateway.mastercard.com/checkout/version/30/checkout.js" data-beforeRedirect="Checkout.saveFormFields" data-afterRedirect="Checkout.restoreFormFields"> </script> </head> ... </html>
None
An object which represents the input elements on the current page and their values. The input values can be re-written to the page page by passing this object to restoreFormFields().