http://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&feed=atom&action=historyOneShopAPI.asp - Revision history2024-03-29T10:42:52ZRevision history for this page on the wikiMediaWiki 1.17.0http://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=267&oldid=prevAdmin at 20:06, 16 January 20092009-01-16T20:06:27Z<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 20:06, 16 January 2009</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><%</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><%</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>'This class is a wrapper class to the API and will be used to contact the <del class="diffchange diffchange-inline">1ShoppingCart </del>API</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>'This class is a wrapper class to the API and will be used to contact the API</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Class OneShopAPI</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Class OneShopAPI</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Adminhttp://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=197&oldid=prevChrisn at 13:50, 29 May 20082008-05-29T13:50:27Z<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 13:50, 29 May 2008</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 9:</td>
<td colspan="2" class="diff-lineno">Line 9:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private m_ApiCallParameters </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private m_ApiCallParameters </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This property sets your merchant id </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This property sets your merchant id </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> public Property <del class="diffchange diffchange-inline">Let </del>MerchantID(value)</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> public Property <ins class="diffchange diffchange-inline">let </ins>MerchantID(value)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_merchantID = value</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_merchantID = value</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end Property  </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end Property  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This property sets your merchant api key</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This property sets your merchant api key</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> public Property <del class="diffchange diffchange-inline">Let </del>MerchantKey(value)</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> public Property <ins class="diffchange diffchange-inline">let </ins>MerchantKey(value)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_merchantKey = value</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_merchantKey = value</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end Property</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end Property</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> '<del class="diffchange diffchange-inline">this </del>property sets the url location of the api  </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' <ins class="diffchange diffchange-inline">This </ins>property sets the url location of the api  </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> public Property <del class="diffchange diffchange-inline">Let </del>ApiUrl(value)</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> public Property <ins class="diffchange diffchange-inline">let </ins>ApiUrl(value)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_apiUrl = value</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_apiUrl = value</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end Property</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end Property</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 28:</td>
<td colspan="2" class="diff-lineno">Line 28:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This methods takes the NextRecordSet node and</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This methods takes the NextRecordSet node and</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'parses it into the the Api Parameters dictionary</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' parses it into the the Api Parameters dictionary</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub BuildApiParameters(nextRecordSetNode)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub BuildApiParameters(nextRecordSetNode)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 40:</td>
<td colspan="2" class="diff-lineno">Line 40:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This method will add required parameters to a parameter array</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This method will add required parameters to a parameter array</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This array will be used when building the request body to  </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This array will be used when building the request body to  </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'send to the API </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' send to the API </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub AddApiParameter(parameterName, parameterValue)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub AddApiParameter(parameterName, parameterValue)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'Check if key already exists if so reset the value to the</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' Check if key already exists if so reset the value to the</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'value passed in to the method</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' value passed in to the method</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> if m_apiCallParameters.Exists(parameterName) = false then</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> if m_apiCallParameters.Exists(parameterName) = false then</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_apiCallParameters.Add parameterName,parameterValue</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> m_apiCallParameters.Add parameterName,parameterValue</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 80:</td>
<td colspan="2" class="diff-lineno">Line 80:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This method will call the win_http request method</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This method will call the win_http request method</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'after appending the proper information to the url</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' after appending the proper information to the url</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'and creating the request body</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' and creating the request body</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private function ApiRequest(api_path)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private function ApiRequest(api_path)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 96:</td>
<td colspan="2" class="diff-lineno">Line 96:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This method will take a properly formatted api url</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This method will take a properly formatted api url</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'and create the response body then call the http request method</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' and create the response body then call the http request method</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function XlinkApiRequest(url)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function XlinkApiRequest(url)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 110:</td>
<td colspan="2" class="diff-lineno">Line 110:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This method will create the request body</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This method will create the request body</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'which consists of the merchant key wrapped</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' which consists of the merchant key wrapped</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'in XML expected by the API</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' in XML expected by the API</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private function CreateRequestString()</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private function CreateRequestString()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> dim requestBody</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> dim requestBody</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 120:</td>
<td colspan="2" class="diff-lineno">Line 120:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This method will take an array of parameters and create</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' This method will take an array of parameters and create</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'the rest of the request body to send to the API</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ' the rest of the request body to send to the API</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private function ParseAPIParameters()</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> private function ParseAPIParameters()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> dim bodyParameters</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> dim bodyParameters</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 136:</td>
<td colspan="2" class="diff-lineno">Line 136:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'Retrieve Order Information from API</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'ORDERS LIST</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetOrderList()</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetOrderList()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetOrderList = ApiRequest("/ORDERS/LIST")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetOrderList = ApiRequest("/ORDERS/LIST")</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'SPECIFIC ORDER</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetOrderById(order_id)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetOrderById(order_id)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetOrderById = ApiRequest("/ORDERS/" & order_id & "/READ")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetOrderById = ApiRequest("/ORDERS/" & order_id & "/READ")</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'Retrieve Product Information from API</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'PRODUCT LIST</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetProductList()</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetProductList()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetProductList = ApiRequest("/PRODUCTS/LIST")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetProductList = ApiRequest("/PRODUCTS/LIST")</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'SPECIFIC PRODUCT</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetProductById(product_id)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetProductById(product_id)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetProductById = ApiRequest("/PRODUCTS/" & product_id & "/READ")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetProductById = ApiRequest("/PRODUCTS/" & product_id & "/READ")</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'Retrieve Client Information from API</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'CLIENT LIST</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetClientList()</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetClientList()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetClientList = ApiRequest("/CLIENTS/LIST")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetClientList = ApiRequest("/CLIENTS/LIST")</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'SPECIFIC CLIENT</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetClientById(client_id)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetClientById(client_id)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetClientById = ApiRequest("/CLIENTS/" & client_id & "/READ")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetClientById = ApiRequest("/CLIENTS/" & client_id & "/READ")</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'Retrieve the list of available methods</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetAvailableAPIMethods()</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetAvailableAPIMethods()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetAvailableAPIMethods = ApiRequest("")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetAvailableAPIMethods = ApiRequest("")</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end function </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> 'Retrieve list of possible Error messages</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetErrorList()</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public function GetErrorList()</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetErrorList = ApiRequest("/ERRORS/LIST")</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> GetErrorList = ApiRequest("/ERRORS/LIST")</div></td></tr>
</table>Chrisnhttp://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=179&oldid=prevChrisn at 18:57, 28 May 20082008-05-28T18:57:15Z<p></p>
<a href="http://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=179&oldid=178">Show changes</a>Chrisnhttp://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=178&oldid=prevChrisn at 18:56, 28 May 20082008-05-28T18:56:30Z<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 18:56, 28 May 2008</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 32:</td>
<td colspan="2" class="diff-lineno">Line 32:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub BuildApiParameters(nextRecordSetNode)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub BuildApiParameters(nextRecordSetNode)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> if nextRecordSetNode.nodename = "NextRecordSet" then</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> if nextRecordSetNode.nodename = "NextRecordSet" then <ins class="diffchange diffchange-inline"> </ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> </del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> ClearAPIParameters <ins class="diffchange diffchange-inline"> </ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> ClearAPIParameters</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> </del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> for each node in nextRecordSetNode.ChildNodes</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> for each node in nextRecordSetNode.ChildNodes</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> AddApiParameter node.nodename, node.text</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> AddApiParameter node.nodename, node.text</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> next</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> next <ins class="diffchange diffchange-inline"> </ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> </del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> end if </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> end if </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
</table>Chrisnhttp://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=177&oldid=prevChrisn at 18:55, 28 May 20082008-05-28T18:55:49Z<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 18:55, 28 May 2008</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 28:</td>
<td colspan="2" class="diff-lineno">Line 28:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> end sub</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 'This methods takes the NextRecordSet node and  </div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> 'This methods takes the NextRecordSet node and</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">    </del>'parses it into the the Api Parameters dictionary</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"> </ins>'parses it into the the Api Parameters dictionary</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub BuildApiParameters(nextRecordSetNode)</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> public sub BuildApiParameters(nextRecordSetNode)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> </div></td></tr>
</table>Chrisnhttp://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=176&oldid=prevChrisn at 18:55, 28 May 20082008-05-28T18:55:23Z<p></p>
<a href="http://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=176&oldid=94">Show changes</a>Chrisnhttp://api.1shoppingcart.com/index.php?title=OneShopAPI.asp&diff=94&oldid=prevChrisn: New page: <pre> <% 'This class is a wrapper class to the API and will be used to contact the 1ShoppingCart API Class OneShopAPI Private m_MerchantID Private m_MerchantKey Private m_ApiUrl Priva...2008-05-26T19:31:50Z<p>New page: <pre> <% 'This class is a wrapper class to the API and will be used to contact the 1ShoppingCart API Class OneShopAPI Private m_MerchantID Private m_MerchantKey Private m_ApiUrl Priva...</p>
<p><b>New page</b></p><div><pre><br />
<%<br />
'This class is a wrapper class to the API and will be used to contact the 1ShoppingCart API<br />
Class OneShopAPI<br />
<br />
Private m_MerchantID<br />
Private m_MerchantKey<br />
Private m_ApiUrl<br />
Private m_ApiCallParameters <br />
<br />
'This property sets your merchant id <br />
Public Property Let MerchantID(value)<br />
m_merchantID = value<br />
End Property <br />
<br />
'This property sets your merchant api key<br />
Public Property Let MerchantKey(value)<br />
m_merchantKey = value<br />
End Property <br />
<br />
'this property sets the url location of the api <br />
Public Property Let ApiUrl(value)<br />
m_apiUrl = value<br />
End Property<br />
<br />
Private sub class_initialize()<br />
set m_ApiCallParameters = Server.CreateObject("Scripting.Dictionary")<br />
End sub<br />
<br />
'This method will add required parameters to a parameter array<br />
'This array will be used when building the request body to <br />
'send to the API <br />
Public sub AddApiParameter(parameterName, parameterValue)<br />
<br />
'Check if key already exists if so reset the value to the<br />
'value passed in to the method<br />
if m_apiCallParameters.Exists(parameterName) = false then<br />
m_apiCallParameters.Add parameterName,parameterValue<br />
else<br />
m_apiCallParameters.item(parameterName) = parameterValue<br />
End if <br />
<br />
End Sub <br />
<br />
'This method will clear all the values in the api parameters dictionary<br />
Public Sub ClearAPIParameters()<br />
m_ApiCallParameters.RemoveAll<br />
End Sub <br />
<br />
'this method uses the WinHttpRequest object to make<br />
'a POST request to the api and return the response<br />
'from the API<br />
Private Function SendHttpRequest(url, request_body)<br />
<br />
dim winHttp<br />
dim apiResult <br />
<br />
Set winHttp = Server.CreateObject("WinHttp.WinHttpRequest.5.1") <br />
winHttp.Open "POST", url, false <br />
winHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" <br />
winHttp.Send request_body <br />
apiResult = winHttp.ResponseBody<br />
<br />
set winHttp = nothing<br />
<br />
SendHttpRequest = apiResult<br />
<br />
End Function<br />
<br />
'This method will call the win_http request method<br />
'after appEnding the proper information to the url<br />
'and creating the request body<br />
Private Function ApiRequest(api_path)<br />
<br />
dim url<br />
dim request_body<br />
dim result<br />
<br />
url = m_apiUrl & "/API/" & m_merchantID & api_path <br />
request_body = CreateRequestString() <br />
result = SendHttpRequest(url, request_body) <br />
ApiRequest = result <br />
<br />
End Function <br />
<br />
'This method will take a properly formatted api url<br />
'and create the response body then call the http request method<br />
Public Function XlinkApiRequest(url)<br />
<br />
dim request_body<br />
dim result<br />
<br />
request_body = CreateRequestString() <br />
result = SendHttpRequest(url, request_body) <br />
<br />
XlinkApiRequest = result<br />
<br />
End Function<br />
<br />
'This method will create the request body<br />
'which consists of the merchant key wrapped<br />
'in XML expected by the API<br />
Private Function CreateRequestString()<br />
dim requestBody<br />
<br />
requestBody = "<Request><Key>" & m_merchantKey & "</Key>" & ParseAPIParameters() & "</Request>" <br />
CreateRequestString = requestBody<br />
End Function<br />
<br />
'This method will take an array of parameters and create<br />
'the rest of the request body to send to the API<br />
Private Function ParseAPIParameters()<br />
dim bodyParameters<br />
bodyParameters = ""<br />
<br />
for each key in m_apiCallParameters.Keys<br />
<br />
bodyParameters = bodyParameters & _<br />
"<" & key & ">" & m_apiCallParameters.Item(key) & "</" & key & ">"<br />
next<br />
<br />
ParseAPIParameters = bodyParameters<br />
<br />
End Function<br />
<br />
'Retrieve Order Information from API<br />
<br />
'ORDERS LIST<br />
Public Function GetOrderList()<br />
GetOrderList = ApiRequest("/ORDERS/LIST")<br />
End Function<br />
<br />
'SPECIFIC ORDER<br />
Public Function GetOrderById(order_id)<br />
GetOrderById = ApiRequest("/ORDERS/" & order_id & "/READ")<br />
End Function<br />
<br />
'Retrieve Product Information from API<br />
<br />
'PRODUCT LIST<br />
Public Function GetProductList()<br />
GetProductList = ApiRequest("/PRODUCTS/LIST")<br />
End Function<br />
<br />
'SPECIFIC PRODUCT<br />
Public Function GetProductById(product_id)<br />
GetProductById = ApiRequest("/PRODUCTS/" & product_id & "/READ")<br />
End Function<br />
<br />
'Retrieve Client Information from API<br />
<br />
'CLIENT LIST<br />
Public Function GetClientList()<br />
GetClientList = ApiRequest("/CLIENTS/LIST")<br />
End Function<br />
<br />
'SPECIFIC CLIENT<br />
Public Function GetClientById(client_id)<br />
GetClientById = ApiRequest("/CLIENTS/" & client_id & "/READ")<br />
End Function<br />
<br />
'Retrieve the list of available methods<br />
Public Function GetAvailableAPIMethods()<br />
GetAvailableAPIMethods = ApiRequest("")<br />
End Function <br />
<br />
'Retrieve list of possible Error messages<br />
Public Function GetErrorList()<br />
GetErrorList = ApiRequest("/ERRORS/LIST")<br />
End Function <br />
<br />
End Class<br />
%><br />
</pre></div>Chrisn