developer:soap-1.3:methods:getbatchtransactions

Soap API v1.3

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

transactionObject[] getBatchTransactions ( ueSecurityToken Token, Integer BatchRefNum )

Arguments

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.

Return Value

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 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()); 
 
} 
 
?> 

Java

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());
}

Visual Basic (.Net)

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")

.NET C#

string BatchRefNum = "9581";
 
            try
            {
                usaepay.TransactionObject[] tran = client.getBatchTransactions(token, BatchRefNum);
 
                MessageBox.Show(string.Concat("Found ",tran.Length));
 
            }
 
 
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }

XML

<?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">11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</HashValue>
<Seed xsi:type="xsd:string">12678150211876663375</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>

Change History

Version Change
1.2 Renamed BatchNum Parameter to BatchRefNum
1.1 Soap 1.1 Release
developer/soap-1.3/methods/getbatchtransactions.txt · Last modified: 2010/08/10 15:07 by irina

Page Tools