Sample Source Code

Here you will find sample code in PHP, Java, .NET, and XML. The source code provided can help you quickly learn the Z-Commerce API as well as how to implement SOAP-based web services.

Microsoft Azure

The Azure sample code shows how to handle make calls with the Zuora API, as well as how to setup an online storefront that captures orders.

Download the Quick Start for Azure.

Z-Store

The Z-Store source code contains a complete web store application that runs entirely on the Z-Commerce Platform. No databases or third party libraries needed. Just setup your product catalog within Zuora, add your sandbox credentials to a source file, and you'll have your own instance of Z-Store up and running in no time. PHP 5 required.

Download the PHP code for Z-Store.



Ruby On Rails

This sample source code package has two key applications: A console based application that shows the basics of the Zuora API, and a Ruby on Rails applications shows "sign up now" web-based store application.

Download the Ruby on Rails sample code.

XML

The XML shows proper SOAP calls for querying, deleting and updating objects as well as using subscriptions and amendments. Whether you develop in PHP, Java, .NET or any other language, the XML can help you quickly debug your SOAP applications.

Download the XML sample code.

Java

The Java reference application is based on Apache Axis 1.4 and JDK 5.0 (Java 2 Platform Standard Edition Development Kit 5.0). For more information on Apache Axis 1.4, see http://ws.apache.org/axis/.

The Java reference application includes the Axis libraries and a properties file. The properties file contains sample data for use by the reference application.

Running the Java Reference Application

You will need Apache Ant installed. Once you have Ant setup, you can run the reference application by invoking

ant test run

Ant is a Java-based build tool that uses XML-formatted files to perform the same types of functions as a make file. In addition to running the code, the build.xml file generates the object stubs and compiles and runs the code.

Download the Java reference application.

PHP

The PHP sample code gives illustrative examples for how to handle authentication, querying, updating and deleting. This PHP sample code is hosted at GitHub, and requires PHP 5.

Download the PHP sample code.

.NET

The .NET sample code shows how to handle authentication as well as querying for objects in the Z-Commerce Platform.

Download the .NET sample code.