Sample Code

From Developer's API

(Difference between revisions)
(ASP)
(PHP)
Line 21: Line 21:
  
 
==PHP==
 
==PHP==
<pre><code>PHP</code></pre>
+
 
 +
[[OneShopAPI.php]]
 +
 
 +
[[OneShopNotificationListener.php]]
  
 
==Coldfusion==
 
==Coldfusion==

Revision as of 19:28, 26 May 2008

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 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 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.

Contents

.NET 2.0 (C#)

OneShopAPI.cs

OneShopNotificationListener.cs

ASP

OneShopAPI.asp

OneShopNotificationListener.asp

PHP

OneShopAPI.php

OneShopNotificationListener.php

Coldfusion

<code>CFML</code>

Perl

<code>PL</code>

JSP

<code>JSP</code>