Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

FieldTypeDescription
cartCartThe cart object
errorParameterNamestring

The name of the http query parameter that should be used to denote errors. There are two places for errors. During the API call, and after the page has changed. This name is used for the latter. Once the location has handed off to the Background Processor for credit card validations, the user is shown the "Please Wait" screen. If there are errors at this point, the customer is redirected to an error page (denoted by errorReturnToUrl). The error page is typically the checkout page, and the page contains code to look for any errors in the url and display them appropriately.

errorReturnToUrlstringThe page that is called when there are second-stage errors with the checkout.
secureHostNamestring

If the site is not running under secure.ultracart.com, this is the server name. While it might seem like this is something that UltraCart could figure out based on the Merchant ID, some merchants have dozens of sites with feeds coming from numerous locations. This string defines the server name explicitly. It may be null.

Requirements:

Any host name passed in via secure host name must be a registered host name with your account. This means you'll need to have the host name registered and a valid SSL certificate on file with UltraCart for that host name to be accepted. If the host name doesn't exist on your account, your default host name will be used. We make this requirement to avoid security issues that might arise from accepting any host name provided.

What secureHostName does:

Passing in a secureHostName will affect the checkout handoff url. It be will used like this: "https://" + secureHostName + "/cgi-bin/UCCheckoutHandoff? The handoff is the portion of the checkout experience where UltraCart takes over and handles things like shipping estimate timeouts, long payment gateway transaction times, retries, etc.

What secureHostName does not:

The secure host name does NOT affect the receipt page. The receipt page is handled by the screen branding theme. It's like that for many legacy reasons, so you'll just need to manage the receipt page separately. If you need a custom receipt page served with a different host name, configure it in your screen branding section set the cart.screenBrandingThemeCode to the screen branding code.

For reference, see:

Screen Branding Themes and Custom Thank You Page URL

payPalBillMeLaterbooleanset this to true if you wish to use PayPal Bill Me Later. The cart.paymentMethod must be equal to "PayPal" for the server to even look at this flag.
payPalMaximumUpsellRevenuedecimal

If you are implementing a custom upsell gauntlet and the payment method is PayPal, you need to specify the maximum amount of upsell revenue possible.

Added January 2014

payPalReturnUrlstring

This is the full url of your first custom upsell page. Need the info below for details.

Warning

Only set this value if you are doing a custom upsell from a third party javascript checkout. If you are not doing a custom upsell, do NOT set this. And do NOT ever set this value to your 'thank you' page. This is not a thank you page. It is an upsell page and you must then call /cart/checkout again when finished with your upsell guantlet.

Custom thank you pages are managed above by the secureHostName variable. The secureHostName variable should point to your StoreFront. And within your StoreFront you must specify a custom thank you page on the Conversion Tracking page.


Added January 2014

forceFinalizeOrderboolean

Scope: PayPal checkout with custom upsell gauntlet.

This flag needs to be set to true during the second call to checkout after a custom upsell using PayPal. That's the only time it needs to be set. When set, it avoids sending the customer to the PayPal authentication screen again.

  1. 1st call of /rest/cart/checkout
  2. Redirects to PayPal.com
  3. Customer completes process a PayPal
  4. Redirects back to UltraCart
  5. Redirects customer to the custom return URL
  6. Customer completes a custom upsell gauntlet
  7. 2nd call of /rest/cart/checkout  (important that they set checkoutRequest.forceFinalizeOrder = true) for the call

...

Info

Using PayPal with a custom upsell gauntlet:

When a checkout has upsells configured, and a PayPal payment method is chosen, the maximum amount of the upsell guantlet is used when authorizing funds. By doing this, the checkout is able to offer upsells and capture funds without having the customer login to PayPal again. Some merchants have need to implement their own upsell gauntlet. To provide a custom gauntlet and accept PayPal, you will need to supply two additional fields in your CheckoutRequest object.

  1. payPalMaximumUpsellRevenue - the maximum upsell gauntlet $$. This should NOT include the current cart total.
  2. payPalReturnUrl - this is the first page of your custom upsell gauntlet.  

Your guantlet pages are responsible for loading up the cart again, displaying offers, adding them to the cart, and then doing another "checkout" call at the end of the guantlet. This will again submit the cart to the UltraCart checkout service, finalize the order, and present the customer with a receipt.


Warning

Only set this value if you are doing a custom upsell from a third party javascript checkout. If you are not doing a custom upsell, do NOT set this. And do NOT ever set this value to your 'thank you' page. This is not a thank you page. It is an upsell page and you must then call /cart/checkout again when finished with your upsell guantlet.

Custom thank you pages are managed above by the secureHostName variable. The secureHostName variable should point to your StoreFront. And within your StoreFront you must specify a custom thank you page on the Conversion Tracking page.





CheckoutResponse

This is the object returned from the REST API when the cart is submitted to be an order.

...