Retrieve transactions in the batch specified by BatchNum,
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 BatchNum )
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and validate transaction. |
integer | BatchNum | 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 { $refnum=$this->runQuickSale(); $BatchNum=0; $res=$client->getBatchTransactions($token, $BatchNum); print_r($res); } catch (SoapFault $e) { die("get Batch Transactions failed :" .$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 BatchNum As String ' Set BatchNum to 0 to get the current batch. ' Otherwise use batch reference num (can be found in Transaction.Details.BatchNum) BatchNum = "0" Dim transactions() As usaepay.TransactionObject = client.getBatchTransactions(token, BatchNum) MsgBox("Found " & transactions.Length & " transactions in current batch")
string BatchRefNum = "9898"; try { usaepay.TransactionObject[] tran = client.getBatchTransactions(token, BatchRefNum); MessageBox.Show(string.Concat("Found ",tran.Length)); } catch (Exception err) { MessageBox.Show(err.Message); }
<?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> <BatchNum xsi:type="xsd:integer">0</BatchNum> </ns1:getBatchTransactions> </SOAP-ENV:Body> </SOAP-ENV:Envelope>