Using Google Checkout SDK
The Google
Checkout API Java SDK provides a library and instructions to integrate
Google Checkout XML APIs in your Web applications. The release notes document the updates in
this release.
Using the SDK
The remainder of the instructions assume that you unzipped the checkout
sdk at checkout-sdk/ directory. Here are the steps to use this SDK:
- Copy checkout-sdk.jar to your WEB-INF/lib
- Copy checkout-sdk/web/WEB-INF/checkout-config.xml to your
WEB-INF/ directory
- Edit your WEB-INF/web.xml and cut-and-paste the contents from
web/WEB-INF/web.xml
- If you need to add additional handlers to process checkout
notifications, edit checkout-config.xml and change default value of
the handlers to your classes.
- Use Checkout SDK Javadocs
to extend notification handlers
- The Checkout SDK Source code is available under the project/ directory
if you need to learn how the notification handlers work
- Copy over the contents of web/checkout to a suitable directory in your
application. For example, web/checkout
- Your application is now ready to use Google Checkout APIs.
Deploy it on tomcat or another application server to test the
integration.
Building the Source-code
The source-code for Checkout SDK is included in the project/ directory.
- To run it from NetBeans, just load up the project/ directory
as a NetBeans project. Configure tomcat, and deploy the application to
run it.
- To build the application from command-line, cd to the project/
directory and follow these steps:
- Edit build.properties and adjust the value of tomcat.home to
point to your Tomcat installation. If you intend to use a different
application server, you can ignore the tomcat.home variable, and
instead adjust the servlet-api-jar.path property directly to point to
the location of servlet-api.jar
- Make sure that you have ant installed, and run ant -f
standalone-build.xml
- Check dist/ directory to see newly created checkout-sdk.jar
and checkout-war.jar