developer:soap-1.1:methods:getbatchstatus

getBatchStatus

Retrieves the status of a batch specified by its BatchNum.

Description

This method will check on the status of any batch within the merchant console. Enter the BatchNum (a unique batch reference number assigned by the gateway) into the search field and the method will return the status of the requested batch.

To pull the status of the currently open batch (which has not yet passed to the gateway), use 0 for the the BatchNum.

See also searchBatches, closeBatch, getBatchTransactions

Syntax

BatchStatus getBatchStatus ( ueSecurityToken Token, integer BatchNum )

Arguments

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.

Return Value

BatchStatus This method returns a BatchStatus object which includes information about the requested batch including BatchNum (if assigned), batch sequence, status (open, closing, or closed) dates and times when the batch was opened and closed, sales count, credit count, total settled amount and other pertinent details.

Examples

PHP

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->getBatchStatus($token, $BatchNum);  
  print_r($res); 
 
  $this->assertTrue($res->Status=='Paused'); 
 
} 
 
catch (SoapFault $e) { 
 
  die("get Batch Upload status failed :" .$e->getMessage()); 
 
  } 
 
?> 

.NET VB

Dim BatchRefNum As String
        BatchRefNum = "9581"
        Dim result As usaepay.BatchStatus = New usaepay.BatchStatus
 
        result = client.getBatchStatus(token, BatchRefNum)
        MsgBox(result.Status)

.NET C#

string BatchRefNum;
            BatchRefNum = "9898";
 
            usaepay.BatchStatus result = new usaepay.BatchStatus();
 
            try
            {
                result = client.getBatchStatus(token, BatchRefNum);
 
                MessageBox.Show(string.Concat(result.Status));
 
            }
 
 
            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:getBatchStatus> 
<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">950f8fabf33653800dd71723a89154acaef9458f</HashValue> 
<Seed xsi:type="xsd:string">11937812191206985820</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:getBatchStatus> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 
developer/soap-1.1/methods/getbatchstatus.txt · Last modified: 2010/10/21 15:06 by irina

Page Tools