checkoutHandoff

checkoutHandoff

Method Signature

CheckoutHandoffResult checkoutHandoff(String returnOnErrorUrl, String errorMessageParameterName);

Description

Hands off the customer's cart into the UltraCart checkout. If the merchant has upsells configured then the customer will be shown those upsells. Then the customer will see the inprogress screen and if the payment is successful the receipt. If there are any errors then the customer is going to be redirect back to the page specific as a parameter and the errors will be appended as query string parameters.

This method should be used if you DO NOT HAVE a custom SSL on your account.  If you have a custom SSL certificate make sure to use the checkoutHandoffOnCustomSSL method in your JavaScript Checkout.

Parameters

String returnOnErrorUrl – the URL to return the browser to if there are any errors.

String errorMessageParameterName – the query string parameter name to put the errors into. If there is more than one error then there will be multiple parameters on the query string with the same name. Be careful to read and display these errors to the customer properly.

Result

CheckoutHandoffResult – Inspect the errors array on the handoff object. If there are any errors you'll need to display them to the customer first and have them correct them before they can continue. If there are no errors then there will be a redirectToUrl populated. You will need to change the browser's window location to this URL to successfully hand off the browser.