This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developer:soap:methods:gettransaction [2008/03/13 12:03] vladg |
developer:soap:methods:gettransaction [2009/09/09 11:47] charlie |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <embed ..:contents/> | ||
+ | |||
====== getTransaction ====== | ====== getTransaction ====== | ||
Line 13: | Line 15: | ||
===== Syntax ===== | ===== Syntax ===== | ||
- | [[developer:soap:objects:TransactionObject]] **getTransaction** ( [[developer:soap:objects:ueSecurityToken]] Token, integer RefNum ) | + | [[..:objects:TransactionObject]] **getTransaction** ( [[..:objects:ueSecurityToken]] Token, integer RefNum ) |
Line 20: | Line 22: | ||
^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 |RefNum |Transaction Reference number assigned by the gateway. | | |integer |RefNum |Transaction Reference number assigned by the gateway. | | ||
Line 26: | Line 28: | ||
===== Return Value ===== | ===== Return Value ===== | ||
- | |[[developer:soap:objects:TransactionObject]] |Returns all information for a specified transaction, including the transaction status, gateway response, date and time of transaction, credit card specific data, transaction amount, cardholder name and address, and all other transaction details. | | + | |[[..:objects:TransactionObject]] |Returns all information for a specified transaction, including the transaction status, gateway response, date and time of transaction, credit card specific data, transaction amount, cardholder name and address, and all other transaction details. | |
===== Examples ===== | ===== Examples ===== | ||
Line 33: | Line 35: | ||
==== PHP ==== | ==== PHP ==== | ||
+ | For directions on how to set up the WSDL link, create "$token" and "$client", go to [[..developer:soap:howto:php|PHP Soap How-to]]. | ||
<code php> | <code php> | ||
<?php | <?php | ||
- | // for directions on how to set up the | ||
- | // WSDL link and create "$token" and "$client," | ||
- | // see: http://wiki.usaepay.com/developer/soap/howto/php | ||
try { | try { | ||
- | $RefNum=1009411; | + | $RefNum=1009411; |
- | $res=$client->getTransaction($token, $RefNum); | + | $res=$client->getTransaction($token, $RefNum); |
- | print_r($res); | + | print_r($res); |
} | } | ||
+ | |||
catch (SoapFault $e){ | catch (SoapFault $e){ | ||
- | die("getTransaction failed :" .$e->getMessage()); | + | die("getTransaction failed :" .$e->getMessage()); |
} | } | ||
Line 54: | Line 56: | ||
</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 RefNum to the Reference Number of transaction you | ||
+ | //want to retrieve. | ||
+ | BigInteger RefNum = new BigInteger(); | ||
+ | |||
+ | TransactionObject Tran = new TransactionObject(); | ||
+ | |||
+ | Tran = client.getTransaction(token, refnum); | ||
+ | |||
+ | System.out.println(Tran.getResponse); | ||
+ | } catch (Exception e) { | ||
+ | System.out.println("Soap Exception: " + e.getMessage()); | ||
+ | } | ||
+ | </code> | ||
==== XML ==== | ==== XML ==== |