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.
See also addProduct, searchProducts
Product getProduct ( ueSecurityToken Token,string ProductRefNum)
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and retrieve the custom fields. |
string | ProductRefNum | Gateway assigned product ID used to pull product details |
Product | 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. |
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php try { $ProductRefNum = '912093987473'; $product = $client->getProduct($token, $ProductRefNum); print_r($product); } catch(SoapFault $e) { echo $e->getMessage(); } ?>
Dim prod As usaepay.Product = New usaepay.Product Dim refNum As String refNum = "9001169811" prod = client.getProduct(token, refNum) MsgBox(prod.Name)
string RefNum = "900116985"; usaepay.Product response = new usaepay.Product(); try { response = client.getProduct(token, RefNum); MessageBox.Show(string.Concat(response.Price)); } catch (Exception err) { MessageBox.Show(err.Message); }
Request:
Response:
Version | Change |
---|---|
1.3 | Method added in this release |