paypalHandoff
Method Signature CheckoutHandoffResult paypalHandoff(String returnOnErrorUrl, String errorMessageParameterName);
Description
Hands off the customer's cart to PayPal
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 to PayPal.