Skip to main content
Vindicia Knowledge Center

Transaction.fetchByAutobill

Transaction.fetchByAutobill

Transaction.fetchByAutobill

The fetchByAutobill method, which returns all the Transaction objects generated by CashBox for an AutoBill object, enables you to retrieve the rebilling transactions related to a specific AutoBill. Because Transactions are automatically generated and completed by CashBox, they are usually not in your system. Occasionally, you might need to access them in order to respond to customer queries.

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

autobill: the AutoBill object that serves as the search criterion. You can identify this object with either its VID or your AutoBill ID (merchantAutoBillId).

Output

return: an object of type Return that indicates the success or failure of the call.

transactions: an array of one or more Transaction objects whose AutoBill object matches the input.

Returns

In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String

400

One of the following:

  • Unable to load autobill to search by: No matches.
  • No autobill specified to load transaction by!

404

Unable to load autobill to search byerror-description.

Example

// Create an AutoBill object to represent an
// existing customer subscription by its id

$autobill = new AutoBill();
$autobill->setMerchantAutoBillId('AB101');

// create a transaction object to make the call

$soap_tx= new Transaction();

// fetch the record(s)

$response = $tx->fetchByAutobill($autobill);
if($response['returnCode'] == 200) {

$fetchedTxns = $response['data']->transactions;

// process fetched transactions here

if ($fetchedTxns != null) {

foreach ($fetchedTxns as $fetchedTx) {

// process a fetched transaction here

print "Transaction VID " . $fetchedTx->getVID();
print "Transaction amount ". $fetchedTx->getAmount();
print "Transaction status ";
print $fetchedTx->statusLog[0]->status . "\n";

}

}

else {

print "No transactions found \n";

}

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top