getBatchUploadStatus

Retrieve the status of a currently running batch.

Description

This method allows you to retrieve the status of a currently running batch.

This method is useful in determining whether a batch has been submitted to the gateway for processing, has been paused or is waiting to be uploaded.

To retrieve the status of batches other than the currently running batch, use the getBatchStatus method.

See also pauseBatchUpload, runBatchUpload, createBatchUpload, getBatchStatus

Syntax

BatchUploadStatus getBatchUploadStatus ( ueSecurityToken Token, string UploadRefNum )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
string UploadRefNum A unique upload reference number assigned by the gateway.

Return Value

Type Description
BatchUploadStatus Returns the status of the currently running batch. Possible results include: open, closing, closed.

Examples

PHP

For directions on how to set up the WSDL link, create "$token" and "$client", go to PHP Soap How-to.


    try {

      $uploadrefnum='127';
      print_r($tran->getBatchUploadStatus($sourcekey,$uploadrefnum));

    }

    catch(SoapFault $e) {

      echo $e->getMessage();
      echo "\n\nRequest: " . $tran->__getLastRequest();
      echo "\n\nResponse: " . $tran->__getLastResponse();

    }

.NET VB

    Dim uploadrefnum As String
            uploadrefnum = "1169"
            Dim res As newtek.BatchUploadStatus = New newtek.BatchUploadStatus
            res = client.getBatchUploadStatus(token, uploadrefnum)
            MsgBox(res.Status)

.NET C

For directions on how to set up the WSDL link and create the "token" and "client" variables, go to the C Sharp .Net Soap How-to.

    string uploadrefnum = "1137";

                newtek.BatchUploadStatus res = new newtek.BatchUploadStatus();

                try
                {
                    res = client.getBatchUploadStatus(token, uploadrefnum);
                    MessageBox.Show(string.Concat(res.Status));
                }

                catch (Exception err)
                {
                    MessageBox.Show(err.Message);
                }

XML

Request:

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="urn:newtek"
    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:getBatchUploadStatus>
    <Token xsi:type="ns1:ueSecurityToken">
    <ClientIP xsi:type="xsd:string">123.123.123.123</ClientIP>
    <PinHash xsi:type="ns1:ueHash">
    <HashValue xsi:type="xsd:string">57cfe9f70f65de841995a738f57705d18c4d1e4c</HashValue>
    <Seed xsi:type="xsd:string">11489158408-test</Seed>
    <Type xsi:type="xsd:string">sha1</Type>
    </PinHash>
    <SourceKey xsi:type="xsd:string">_B4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
    </Token>
    <UploadRefNum xsi:type="xsd:string">79</UploadRefNum>
    </ns1:getBatchUploadStatus>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

Response:

    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="urn:newtek"
    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:getBatchUploadStatusResponse>
    <getBatchUploadStatusReturn xsi:type="ns1:BatchUploadStatus">
    <Approved xsi:type="xsd:integer">0</Approved>
    <UploadRefNum xsi:type="xsd:string">79</UploadRefNum>
    <Declined xsi:type="xsd:integer">0</Declined>
    <Errors xsi:type="xsd:integer">0</Errors>
    <Finished xsi:type="xsd:string"></Finished>
    <Remaining xsi:type="xsd:integer">1</Remaining>
    <Started xsi:type="xsd:string">2016-01-14 15:42:19</Started>
    <Status xsi:type="xsd:string">Running</Status>
    <Transactions xsi:type="xsd:integer">1</Transactions>
    </getBatchUploadStatusReturn>
    </ns1:getBatchUploadStatusResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>