getProductCategories

Parent Previous Next

getProductCategories

Retrieve all product categories

 

Description

This method retrieves an array of ProductCategory objects for all product categories.

 

Syntax

ProductCategory[] getProductCategories ( ueSecurityToken Token)

 

Arguments

Type

Name

Description

ueSecurityToken

Token

Merchant security token: used to identify merchant and retrieve the custom fields.

 

Return Value

ProductCategory[]

Returns an array of ProductCategory objects containing information on the product categories

 

Exceptions

The following exceptions (errors) are applicable to this method.

Code

Message

Advice

 

Examples

 

PHP

 

<?php

?>

 

VB

       Dim category() As eBizCharge.ProductCategory

       category = client.getProductCategories(token)

       MsgBox(category.Length)

 

.NET C#

           try

           {

               eBizCharge.ProductCategory[] category = client.getProductCategories(token);

               MessageBox.Show(string.Concat(category.Length));

           }

           catch (Exception err)

           {

               MessageBox.Show(err.Message);

           }

 

XML

Request:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:ns1="urn:eBizCharge" xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Body>

<ns1:getProductCategories>

<Token xsi:type="ns1:ueSecurityToken">

<ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>

<PinHash xsi:type="ns1:ueHash">

<HashValue xsi:type="xsd:string">11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</HashValue>

<Seed xsi:type="xsd:string">12678150211876663375</Seed>

<Type xsi:type="xsd:string">sha1</Type>

</PinHash>

<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>

</Token>

</ns1:getProductCategories>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Response:

<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:ns1="urn:eBizCharge"

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

 <SOAP-ENV:Body>

   <ns1:getProductCategoriesResponse>

     <getProductCategoriesReturn SOAP-ENC:arrayType="ns1:ProductCategory[4]" xsi:type="ns1:ProductCategoryArray">

       <item xsi:type="ns1:ProductCategory">

         <ProductCategoryRefNum xsi:type="xsd:string">900100191</ProductCategoryRefNum>

         <Name xsi:type="xsd:string">Books:Math</Name>

       </item>

       <item xsi:type="ns1:ProductCategory">

         <ProductCategoryRefNum xsi:type="xsd:string">900100193</ProductCategoryRefNum>

         <Name xsi:type="xsd:string">Example Category</Name>

       </item>

       <item xsi:type="ns1:ProductCategory">

         <ProductCategoryRefNum xsi:type="xsd:string">900100194</ProductCategoryRefNum>

         <Name xsi:type="xsd:string">Example Category</Name>

       </item>

       <item xsi:type="ns1:ProductCategory">

         <ProductCategoryRefNum xsi:type="xsd:string">900100192</ProductCategoryRefNum>

         <Name xsi:type="xsd:string">Test Category</Name>

       </item>

     </getProductCategoriesReturn>

   </ns1:getProductCategoriesResponse>

 </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

: