Menu
Amazon DevPay
Getting Started Guide (API Version 2007-12-01)

About the Sample Code

The sample code is available in the Amazon DevPay Community Code area of the AWS Resource Center. A separate download is posted for each available language (Java, C#, C++, and Ruby).

To create the sample code for all languages except C++, we started with an existing Amazon Simple Storage Service library (to get the library, go to the Amazon Simple Storage Service Community Code area of the AWS Resource Center and look for the one called "Amazon S3 Library for REST in [language]"). We then updated that library so that it makes Amazon S3 requests as required by DevPay (the updated library is in the s3 directory of the DevPay sample code package for each language). We also added an additional library (in the ls directory of the sample code) that calls the License Service. There was no existing Amazon S3 C++ library for us to start with, so we simply created a new one that works with DevPay.

For the Java, C#, and Ruby sample code, you can search for the differences between the original Amazon S3 library and the new DevPay version of the library to easily see what we've changed. The changes are in the AWSAuthConnection class.

In this guide, the Java, C#, and C++ samples demonstrate what is required to make a desktop product (or any distributed product that resides on a desktop, handheld device, etc.) work with DevPay. The Ruby sample demonstrates what is required to make a web (hosted) product work with DevPay. For information about how to handle desktop products and web products, see How a Product Works with DevPay.

Showing Your Preferred Programming Language

You can hide the sections of this guide that don't apply to the programming language you are using. There is a language selection menu in the upper-right corner of pages with language-specific text. Select your language to hide all others, or select All to show the examples in all available languages.

The language selector

Prerequisites for the Sample Code

The following sections list the prerequisites to use the sample code discussed in this guide.

Java (Desktop Product)

  • You must have Apache Ant (for more information, go to http://ant.apache.org).

  • You must be signed up to use Amazon S3.

Note

The Java sample has been tested with Java 6 only.

C# (Desktop Product)

C++ (Desktop Product)

Ruby (Web Product)

  • You must be signed up to use Amazon S3.

About the Shell Program

The sample code includes a simple command shell program that uses the libraries. The shell is located in the ui directory in the sample code package.

Important

To use the shell, you must sign up for a sample DevPay product (like your customers would sign up for your DevPay product). This sample DevPay product has a $0.35 sign-up charge and a monthly recurring charge of $0.35. When you sign up, you are charged accordingly. If you do not want to sign up for the sample product and use the shell, you can still look at all the sample code provided in the package. If you'd like to use the shell for a limited time, you can sign up and then cancel your use of the sample DevPay product when you're done with it.

For details about how to use the shell, see the README file in the sample code package.