Versions Compared

Key

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

Include Page
Status (JS API v2)
Status (JS API v2)

New Features

The difference between v1 and v2 of the JS API can be likened to the difference between the C Programming Language and the C++ Programming Language. Version 1 of the JS API was a set of remote calls that could be strung together in a procedural fashion. Version 2 is an object oriented approach designed to do the heavy lifting behind the scenes and result minimal code needed to use the API.

...

UltraCart has written a php script that can be installed on your local web server and relays remote calls to our API server. This file is critical to work around cross domain limitations. Simply put, your web pages, originating from your web server, cannot make javascript ajax calls to the UltraCart server. The proxy script sits on your server and relays the calls. Once installed, getting the remote calls work is easy. The v1.1 docs have some more detail.

Download the script at https://secure.ultracartgithub.com/merchant/integrationcenter/UltraCart/legacy_javascript/blob/master/example/proxy.php
If your site is being hosted by a third party, chances are everything is already configured for use. The only php requirement is to have curl enabled, but it's our experience that most hosting companies have that enabled by default.

Install the php file in your root directory for simplicity. If you put it elsewhere, just remember to adjust your settings in the js file (only one line changes).

Javascript Files

The Merchant Integration Center github example has links to download the jQuery files needed. Or you may download them from the links above.

Template

The Merchant Integration Center has github example has links to download the template files as well. The base template is a stripped down page designed to look like the single page checkout with minimal mark up allowing for complete customization. Unlike the single page checkout, which is table based, the template relies on div tags for nearly all layout. This makes custom rearrangements easy.

...