Sample Code

From Developer's API

(Difference between revisions)
(.NET 2.0 (C#))
 
(24 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
#OneShopNotificationListener
 
#OneShopNotificationListener
  
The OneShopAPI is a wrapper class to the 1ShoppingCart API. Public methods are exposed to call specific methods of the API, such as GetOrdersList, GetOrderById etc. Private methods exist to formulate the request data and sent the request to the API.
+
The OneShopAPI is a wrapper class to the API. Public methods are exposed to call specific methods of the API, such as GetOrdersList, GetOrderById etc. Private methods exist to formulate the request data and sent the request to the API.
  
The OneShopNotificationListener is a stub program intended to demonstrate how to receive notifications from the 1ShoppingCart API and in turn use the notification data to retrieve detailed information from the API.
+
The OneShopNotificationListener is a stub program intended to demonstrate how to receive notifications from the API and in turn use the notification data to retrieve detailed information from the API.
  
 
==Code disclaimer information==
 
==Code disclaimer information==
  
All sample code provided by 1ShoppingCart is for illustrative purposes only. These examples have not been thoroughly tested under all conditions. 1ShoppingCart, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
+
All sample code provided here is for illustrative purposes only. These examples have not been thoroughly tested under all conditions. We, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
  
 
All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed
 
All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed
Line 16: Line 16:
 
==.NET 2.0 (C#)==
 
==.NET 2.0 (C#)==
  
:[[OneShopAPI.cs]]
+
*[[OneShopAPI.cs]]
  
:[[OneShopNotificationListener.cs]]
+
*[[OneShopNotificationListener.cs]]
 +
 
 +
[[media:CSharpSample.zip | Download C# Sample]]
  
 
==ASP==
 
==ASP==
  
:[[OneShopAPI.asp]]
+
*[[OneShopAPI.asp]]
  
:[[OneShopNotificationListener.asp]]
+
*[[OneShopNotificationListener.asp]]
 +
 
 +
[[media:ASPSample.zip | Download ASP Sample]]
  
 
==PHP==
 
==PHP==
  
:[[OneShopAPI.php]]
+
*[[OneShopAPI.php]]
  
:[[OneShopNotificationListener.php]]
+
*[[OneShopNotificationListener.php]]
  
 
==Coldfusion==
 
==Coldfusion==
  
:[[OneShopAPI.cfc]]
+
*[[OneShopAPI.cfc]]
  
:[[OneShopNotificationListener.cfm]]
+
*[[OneShopNotificationListener.cfm]]
 +
 
 +
[[media:ColdfusionSample.zip | Download Coldfusion Sample]]
  
 
==Perl==
 
==Perl==
  
:[[OneShopAPI.pl]]
+
*[[OneShopAPI.pm]]
  
:[[OneShopNotificationListener.pl]]
+
*[[OneShopNotificationListener.pl]]
 +
 
 +
[[media:PerlSample.zip | Download Perl Sample]]
  
 
==JSP==
 
==JSP==
  
:[[OneShopAPI.jsp]]
+
*[[OneShopAPI.jsp]]
 +
 
 +
*[[OneShopNotificationListener.jsp]]
  
:[[OneShopNotificationListener.jsp]]
+
[[media:JSPSample.zip | Download JSP Sample]]

Latest revision as of 19:26, 22 January 2010

The following sample code has been provided in several different development platforms, as listed below. Within each platform sample package, there are two files.

  1. OneShopAPI
  2. OneShopNotificationListener

The OneShopAPI is a wrapper class to the API. Public methods are exposed to call specific methods of the API, such as GetOrdersList, GetOrderById etc. Private methods exist to formulate the request data and sent the request to the API.

The OneShopNotificationListener is a stub program intended to demonstrate how to receive notifications from the API and in turn use the notification data to retrieve detailed information from the API.

Contents

Code disclaimer information

All sample code provided here is for illustrative purposes only. These examples have not been thoroughly tested under all conditions. We, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.

All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed

.NET 2.0 (C#)

Download C# Sample

ASP

Download ASP Sample

PHP

Coldfusion

Download Coldfusion Sample

Perl

Download Perl Sample

JSP

Download JSP Sample