Thursday, August 14, 2008

Google Checkout NET Sample Code

Google Checkout NET Sample Code
Google Checkout's sample code for .NET is distributed as a .zip file. This file contains classes and methods designed to construct Google Checkout API requests and handle Google Checkout API responses, notifications and merchant calculation callbacks. This code is intended to be integrated directly into your web application.
Contents
This page provides an overview of the Google Checkout .NET sample code. This page is divided into the following sections:
The System Requirements section identifies a list of prerequisites for merchants who plan to use this sample code in their Google Checkout implementations.
The Application Flow for Google Checkout .NET Sample Code section illustrates and explains the process of sending a Checkout API request using the .NET sample code.
The Installing the GCheckout Module section explains how to install and test the Google Checkout sample code for .NET.
The Complex Shopping Cart Example section provides sample code changes for submitting a complex shopping cart. After ensuring that your installation was successful, you can use this sample code to better understand how to create Checkout API requests and how your customer will interact with Google Checkout after clicking the Google Checkout button.
The Integrating the Sample Code into your Web Application contains general information about the code changes that you will need to make when integrating this sample code into your web application.
The Understanding the .NET Sample Code Distribution section provides a short description of each class (.cs) file included in the sample code distribution and links to pages that provide more complete documentation of the individual methods contained in those classes. These pages include a list of all of the methods in a particular class, including an explanation of each method, a list of that method's parameters and the method's code.
The classes in the GCheckout.zip file correspond to the different types of API requests that you can send using Google Checkout. As such, you may be able to disregard certain classes if you are not using the APIs that those files implement.
Note: The sample code in this document uses the alternate method for posting Checkout API requests. This method is described in the Google Checkout Developer's Guide. The sample code uses this alternate technique because ASP.NET uses forms to handle events like button clicks, meaning many ASP.NET pages contain a form. Using the standard method of posting a Checkout API request might require you to add a second form to a page. However, since browsers do not support nested form elements, this approach would not work. The alternate technique for posting carts provides a solution to this problem.

http://code.google.com/apis/checkout/samples/Google_Checkout_Sample_Code_NET.html

No comments: