developer:soap:methods:getcustomerhistory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developer:soap:methods:getcustomerhistory [2008/01/24 11:53]
hpaiz created
developer:soap:methods:getcustomerhistory [2009/09/08 13:16]
charlie
Line 1: Line 1:
- +<embed ..:​contents/>​====== getCustomerHistory ======
-===== Get Customer History ​=====+
  
 Pull details of all transactions run for CustNum. Pull details of all transactions run for CustNum.
 +
 +===== Description =====
  
 This method allows you to view all of the transactions completed for a particular customer. This method allows you to view all of the transactions completed for a particular customer.
  
-This method requires the use of the CustNum, a unique customer number assigned by the gateway. If you have lost or cannot remember the customer'​s CustNum, use the searchCustomers method to find the correct CustNum.+This method requires the use of the CustNum, a unique customer number assigned by the gateway. If you have lost or cannot remember the customer'​s CustNum, use the [[searchCustomers]] method to find the correct CustNum.
  
-See also runCustomerTransaction,​ enableCustomer,​ disableCustomer,​ deleteCustomer,​ searchCustomerID,​ getCustomer,​ searchCustomers,​ addCustomer,​ addCustomerPaymentMethod,​ deleteCustomerPaymentMethod,​ updateCustomer,​ quickUpdateCustomer ​+See also [[runCustomerTransaction]][[enableCustomer]][[disableCustomer]][[deleteCustomer]][[searchCustomerID]][[getCustomer]][[searchCustomers]][[addCustomer]][[addCustomerPaymentMethod]][[deleteCustomerPaymentMethod]][[updateCustomer]][[quickUpdateCustomer]] 
  
 ===== Syntax ===== ===== Syntax =====
  
-TransactionSearchResult getCustomerHistory ( ueSecurityToken Token, integer CustNum ) +[[..:​objects:​TransactionSearchResult]] **getCustomerHistory** [[..:​objects:​ueSecurityToken]] Token, integer CustNum ) 
  
  
 ===== Arguments ===== ===== Arguments =====
  
-ueSecurityToken Token  +^Type   ​^Name ​  ​^Description ​  ^ 
-Merchant security token: used to identify merchant and validate transaction. +|[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and validate transaction.| 
-integer CustNum ​ +|integer ​|CustNum ​|A unique customer number assigned by the gateway. ​|
-A unique customer number assigned by the gateway. ​ +
  
  
 ===== Return Value ===== ===== Return Value =====
  
-TransactionSearchResult ​ +|[[..:​objects:​TransactionSearchResult]] |Returns the results of the customer transaction history search. ​|
-Returns the results of the customer transaction history search. ​+
  
-<code php> +===== Examples =====
-<?​php ​+
  
-// for directions on how to set up the   +==== PHP ==== 
-// WSDL link and create "​$token"​ and "​$client," ​ + 
-// see: http://​usaepay.com/​developer/​howto/php. +For directions on how to set up the WSDL linkcreate "​$token"​ and "​$client"​, go to [[..:howto:php|PHP Soap How-to]]. 
 + 
 +<code php> 
 +<?​php  ​
  
 try {  try { 
  
-    ​$custnum='​547';​  +  ​$custnum='​547';​  
-    print_r($tran->​getCustomerHistory($token,​$custnum)); ​+  print_r($client->​getCustomerHistory($token,​$custnum)); ​
  
-} catch(SoapFault $e) { + 
 + 
 +catch(SoapFault $e) { 
            
-    ​echo $e->​getMessage(); ​+  ​echo $e->​getMessage(); ​
            
  
  
-echo "​\n\nRequest:​ " . $tran->​__getLastRequest();​  +echo "​\n\nRequest:​ " . $client->​__getLastRequest();​  
-echo "​\n\nResponse:​ " . $tran->​__getLastResponse(); ​ +echo "​\n\nResponse:​ " . $client->​__getLastResponse(); ​
- +
  
 ?>  ?> 
 </​code>​ </​code>​
  
 +==== Java ====
  
 +This example uses the [[developer/​javalibrary|USAePay Java library]]. ​ For directions on how to install the library and create the token/​client objects, go to either the [[..:​howto:​javajaxrpc|Java JAX-RPC Howto]] or the [[..:​howto:​javajaxws|Java JAX-WS Howto]].
 +
 +<code java>
 +try {
 +  //Set CustNum to the Customer Number of customer you 
 +  //want to retrieve a transaction history from.
 +  BigInteger CustNum = new BigInteger;
 +  ​
 +  TransactionSearchResult CustHist = new TransactionSearchResult();​
 +  CustHist = client.getCustomerHistory(token,​ CustNum);
 +} catch (Exception e) {
 +    System.out.println("​Soap Exception: " + e.getMessage());​
 +}
 +</​code>​
developer/soap/methods/getcustomerhistory.txt · Last modified: 2009/09/08 13:16 by charlie

Page Tools