Retrieve all data for a single product
This method retrieves the Product object for the product specified by ProductRefNum. The ProductRefNum is the gateway assigned unique product identifier that was returned by addProduct. searchProducts can be used to find the ProductRefNum for a product if it is not known.
The entire Product object is returned.
Product getProduct ( ueSecurityToken Token,string ProductRefNum)
Type |
Name |
Description |
Token |
Merchant security token: used to identify merchant and retrieve the custom fields. |
|
string |
ProductRefNum |
Gateway assigned product ID used to pull product details |
Returns a Product object containing fields and their values. |
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. |
<?php
try {
$ProductRefNum = '912093987473';
$product = $client->getProduct($token, $ProductRefNum);
print_r($product);
}
catch(SoapFault $e) {
echo $e->getMessage();
}
?>
Dim prod As eBizCharge.Product = New eBizCharge.Product
Dim refNum As String
refNum = "9001169811"
prod = client.getProduct(token, refNum)
MsgBox(prod.Name)
string RefNum = "900116985";
eBizCharge.Product response = new eBizCharge.Product();
try
{
response = client.getProduct(token, RefNum);
MessageBox.Show(string.Concat(response.Price));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
Request:
Response: