This method deletes an existing product.
This method removes the specified ProductRefNum from the product database. The product is deleted immediately and this operation can not be undone. The ProductRefNum is the gateway assigned product ID that was returned by addProduct. searchProducts can be used to find the ProductRefNum for a product if it is not known.
boolean deleteProduct ( ueSecurityToken Token, string ProductRefNum)
Type |
Name |
Description |
Token |
Merchant security token: used to identify merchant and retrieve the custom fields. |
|
string |
ProductRefNum |
Product reference number used to delete a product |
boolean |
Returns true if product has been deleted (on error an exception is thrown) |
The following exceptions (errors) are applicable to this method.
Code |
Message |
Advice |
41002 |
Product Not Found |
Product specified by ProductRefNum was not found. Make sure the number stored is not truncated or rounded. |
41005 |
Failed to delete product |
A database fault was encountered while deleting product record. Try operation again or contact support |
<?php
try {
$ProductRefNum='919932077432';
$client->deleteProduct($token, $ProductRefNum);
}
catch(SoapFault $e) {
echo $e->getMessage();
}
?>
Dim refNum As String
refNum = "9001169810"
Dim response As Boolean
response = client.deleteProduct(token, refNum)
MsgBox(response)
string RefNum = "900116982";
Boolean response;
try
{
response = client.deleteProduct(token, RefNum);
MessageBox.Show(string.Concat(response));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
Request:
Response: