Retrieve all product categories
This method retrieves an array of ProductCategory objects for all product categories.
See also addProductCategory
ProductCategory[] getProductCategories ( ueSecurityToken Token)
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and retrieve the custom fields. |
ProductCategory[] | Returns an array of ProductCategory objects containing information on the product categories |
The following exceptions (errors) are applicable to this method.
Code | Message | Advice |
---|
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php ?>
Dim category() As usaepay.ProductCategory category = client.getProductCategories(token) MsgBox(category.Length)
try { usaepay.ProductCategory[] category = client.getProductCategories(token); MessageBox.Show(string.Concat(category.Length)); } catch (Exception err) { MessageBox.Show(err.Message); }
Request:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:usaepay" 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:usaepay" 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[5]" xsi:type="ns1:ProductCategoryArray"> <item xsi:type="ns1:ProductCategory"> <ProductCategoryRefNum xsi:type="xsd:string">90117800130</ProductCategoryRefNum> <Name xsi:type="xsd:string">ExampleCategory1</Name> </item> <item xsi:type="ns1:ProductCategory"> <ProductCategoryRefNum xsi:type="xsd:string">90117806147</ProductCategoryRefNum> <Name xsi:type="xsd:string">ExampleCategory2</Name> </item> </item> <item xsi:type="ns1:ProductCategory"> <ProductCategoryRefNum xsi:type="xsd:string">90117806152</ProductCategoryRefNum> <Name xsi:type="xsd:string">ExampleCategory3</Name> </item> </getProductCategoriesReturn> </ns1:getProductCategoriesResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>
Version | Change |
---|---|
1.3 | Method added in this release |