Multi-Page Checkout Handler
The multi-page checkout handler is a set of three functions that lets you save a successful
onComplete callback result and later retrieve it. The information is saved for the user’s browser session, and will not persist beyond that. This is used primarily when the Express version of virtual checkout is used and a consumer starts the checkout from the Cart or Product page. This means you can retrieve the result on page load of the payment page and populate shopper, shipping address, billing address and payment information.
This method accepts the result object returned from the
onComplete callback as a parameter that will be invoked when a customer successfully completes the Zip checkout. It is responsible for saving the card, cardholder, customer, shippingAddress, and merchantFeeForPaymentPlan in session storage, for the duration of the user’s browser session. In the event that the checkout process spans multiple pages this information can be saved (and cleared) to allow for checkout information to be available to the merchant through page loads and redirects. This method is designed for Express checkout flows.
This method returns the previously stored values from the
saveResult() method completed on the previous stage. The result object contains the
merchantFeeForPaymentPlan. This allows for checkout information to be accessible to the merchant through page loads and redirects in express checkout flows.
var result = window.quadpay.virtualCheckout.getCompleteResult();
This method clears the previously stored values from the
saveResult() method from the session storage to ensure that
merchantFeeForPaymentPlan information is removed from the browser after multi-page checkout has been completed.
Updated over 1 year ago