deleteProductCategoryy

Parent Previous Next

updateProductCategory

This method updates an existing product category.

 

Description

Updates an existing product category based on its ProductCategoryRefNum. The entire product category is replaced by the contents of the Product category parameter. Developers can use the getProductCategory method to retrieve the Product category object, modify a field and then post the object back to the server.

 

Syntax

boolean updateProductCategory ( ueSecurityToken, ProductCategoryRefNum, ProductCategory)

 

Arguments

Type

Name

Description

ueSecurityToken

Token

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

string

ProductCategoryRefNum

Product category reference number (gateway assigned)

ProductCategory

Product Category

Product category data

 

Return Value

boolean

Returns a true if the product category is updated correctly

 

Exceptions

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

Code

Message

Advice

41007

Error saving product categry

Product Category specified by ProductCategoryRefNum was not found. Make sure the number stored is not truncated or rounded.

 

Examples

 

PHP

 

VB

Dim catRefNum As String

       catRefNum = "9001169811"

       Dim category As eBizCharge.ProductCategory = New eBizCharge.ProductCategory

       category.Name = "third try"

       Dim response As Boolean

       response = client.updateProductCategory(token, catRefNum, category)

       MsgBox(response)

 

 

.NET C#

           string catRefNum = "900116983";

           eBizCharge.ProductCategory category = new eBizCharge.ProductCategory();

           category.Name = "next try";

           Boolean response;

           try

           {

               response = client.updateProductCategory(token, catRefNum, category);

               MessageBox.Show(string.Concat(response));

           }

           catch (Exception err)

           {

               MessageBox.Show(err.Message);

           }

 

 

XML

Request:

Response:

: