Versions Compared

Key

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

Introduction

UltraCart offers a SOAP interface to the Checkout process. Admittedly, it's not well documented. There aren't many merchants currently using it.
The functionality of it is nearly identical to the Javascript API, in terms of methods and objects, so please cross-reference the Javascript API docs for insight.

...

Example

Version

Changes

ucsoap.zip

1.0

Initial Version

ucsoap_1.1.zip

1.1

Added registerCustomer(), loginCustomer(), establishCustomerProfile(), and customer_profile.php demo page

WSDL

Here's the WSDL. It has all the gory details.https://secure.ultracart.com/axis/services/CheckoutAPIV2?wsdl

Usage

Here's an example php script for using the SOAP Checkout:

Code Block
languagephp
themeDJango
linenumberstrue
<?php
$url = 'https://secure.ultracart.com/axis/services/CheckoutAPIV1?wsdl';
$client = new SoapClient($url);
$merchantId = 'DEMO';

/*** Check if there's already a cart ***/
if(!isset($_COOKIE["cartId"])){
	$cart = $client->createCart($merchantId);
}else{
	$cartId=$_COOKIE["cartId"];
	$cart = $client->getCart($merchantId,$cartId);
}
?>

Anchor
samples
samples

Sample Files

File

Comments

list_functions.php

List all SOAP functions

add_item.php

Add an item to a cart

add_items.php

Add several items to a cart

get_items.php

Get items and display them

update_items.php

Add/Update/Delete Items, also Clear Cart and estimateShipping. You'll need jquery.1.4.2+ to execute estimateShipping()

estimate_shipping.php

queries available shipping methods and returns them in json format. called via ajax by update_items.php

Common Problems

No deserializer for CartItemMultimedia

Further Information

What would you like to see? Use the feedback button at the bottom of this page or the Forums and let us know what tutorials you'd like to see.