developer:soap:methods:getcustomerhistory

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer:soap:methods:getcustomerhistory [2008/02/13 07:25]
nell
developer:soap:methods:getcustomerhistory [2009/09/08 13:16]
charlie
Line 1: Line 1:
-====== getCustomerHistory ======+<embed ..:​contents/>​====== getCustomerHistory ======
  
 Pull details of all transactions run for CustNum. Pull details of all transactions run for CustNum.
Line 13: Line 13:
 ===== Syntax ===== ===== Syntax =====
  
-[[developer:​soap:​objects:​TransactionSearchResult]] **getCustomerHistory** ( [[developer:​soap:​objects:​ueSecurityToken]] Token, integer CustNum ) +[[..:​objects:​TransactionSearchResult]] **getCustomerHistory** ( [[..:​objects:​ueSecurityToken]] Token, integer CustNum ) 
  
  
Line 19: Line 19:
  
 ^Type   ​^Name ​  ​^Description ​  ^ ^Type   ​^Name ​  ​^Description ​  ^
-|[[developer:​soap:​objects:​ueSecurityToken]] |Token |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 |A unique customer number assigned by the gateway. | |integer |CustNum |A unique customer number assigned by the gateway. |
  
Line 25: Line 25:
 ===== Return Value ===== ===== Return Value =====
  
-|[[developer:​soap:​objects:​TransactionSearchResult]] |Returns the results of the customer transaction history search. |+|[[..:​objects:​TransactionSearchResult]] |Returns the results of the customer transaction history search. |
  
 ===== Examples ===== ===== Examples =====
Line 31: Line 31:
 ==== PHP ==== ==== PHP ====
  
-<code php> +For directions on how to set up the WSDL link, create "​$token"​ and "​$client",​ go to [[..:howto:php|PHP Soap How-to]].
-<?php +
  
-// for directions on how to set up the  ​ +<code php> 
-// WSDL link and create "​$token"​ and "​$client,"​  +<?php  
-// see: http://​usaepay.com/​developer/​howto/​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