====== getBatchTransactions ======
Retrieve transactions in the batch specified by BatchRefNum,
===== Description =====
This method will return all of the transactions contained within the specified batch. Use this method to retrieve all transaction data including status, type, amount, response and customer information.
See also: [[getBatchStatus]], [[closeBatch]], [[searchBatches]].
===== Syntax =====
[[..:objects:transactionObject]][] **getBatchTransactions** ( [[..:objects:ueSecurityToken]] Token,
Integer BatchRefNum )
===== Arguments =====
^Type ^Name ^Description ^
|[[..:objects:ueSecurityToken]] |Token |Merchant security token: used to identify merchant and validate transaction.|
|integer |BatchRefNum |A unique batch reference number assigned by the gateway. |
===== Return Value =====
|[[..:objects:transactionObject]][] |Returns an array of TransactionObjects for all transactions in the specified batch |
===== Examples =====
==== PHP ====
For directions on how to set up the WSDL link, create "$token" and "$client", go to [[..:howto:php|PHP Soap How-to]].
getBatchTransactions($token, $BatchRefNum);
}
catch (SoapFault $e) {
die("get Batch Transactions failed :" .$e->getMessage());
}
?>
==== 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]].
try {
//Set BatchNum to the Batch Reference Number of the batch you want
//to retrieve transactions from. 0 is always the current batch
BigInteger BatchNum = new BigInteger("0");
TransactionObjectArray ResultSet = new TransactionObjectArray();
ResultSet = client.getBatchTransactions(token, BatchNum);
} catch (Exception e) {
System.out.println("Soap Exception: " + e.getMessage());
}
==== Visual Basic (.Net) ====
For directions on how to set up the WSDL link, create "token" and "client", go to [[..:howto:vb|Visual Basic .Net Soap How-to]].
Dim BatchRefNum As String
' Set BatchRefNum to 0 to get the current batch.
' Otherwise use batch reference num (can be found in Transaction.Details.BatchRefNum)
BatchRefNum = "0"
Dim transactions() As usaepay.TransactionObject = client.getBatchTransactions(token, BatchRefNum)
MsgBox("Found " & transactions.Length & " transactions in current batch")
==== XML ====
192.168.0.1
6961f591f7cdb9e83ed33cf90ba370e82b8b1643
11937832501524228210
sha1
HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT
0
===== Change History =====
^Version ^Change ^
|1.2 | Renamed BatchNum Parameter to BatchRefNum |
|[[developer:soap-1.1:methods:getbatchtransactions|1.1]] | Soap 1.1 Release |