Retrieve transactions in the batch specified by BatchRefNum,
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.
transactionObject[] getBatchTransactions ( ueSecurityToken Token, Integer BatchRefNum )
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and validate transaction. |
integer | BatchRefNum | A unique batch reference number assigned by the gateway. |
transactionObject[] | Returns an array of TransactionObjects for all transactions in the specified batch |
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php try { //Set BatchRefNum to the Batch Reference Number of the batch you want //to retrieve transactions from. 0 is always the current batch $BatchRefNum=0; $Result=$client->getBatchTransactions($token, $BatchRefNum); } catch (SoapFault $e) { die("get Batch Transactions failed :" .$e->getMessage()); } ?>
This example uses the USAePay Java library. For directions on how to install the library and create the token/client objects, go to either the Java JAX-RPC Howto or the 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()); }
For directions on how to set up the WSDL link, create “token” and “client”, go to 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 version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:usaepay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:getBatchTransactions> <Token xsi:type="ns1:ueSecurityToken"> <ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP> <PinHash xsi:type="ns1:ueHash"> <HashValue xsi:type="xsd:string">6961f591f7cdb9e83ed33cf90ba370e82b8b1643</HashValue> <Seed xsi:type="xsd:string">11937832501524228210</Seed> <Type xsi:type="xsd:string">sha1</Type> </PinHash> <SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey> </Token> <BatchRefNum xsi:type="xsd:integer">0</BatchRefNum> </ns1:getBatchTransactions> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Version | Change |
---|---|
1.2 | Renamed BatchNum Parameter to BatchRefNum |
1.1 | Soap 1.1 Release |