Swagger\Client\AVSApi
Method | HTTP request | Description |
---|---|---|
avsGetBatchTransactions | GET /batch/avs/{id}/transactions | Retrieve a list of transactions and the state of each transaction. |
avsSubmitBatch | POST /batch/avs/{id}/submit | Submit a AVS batch to Bankserv. |
avsUploadCsv | POST /batch/avs | Upload a AVS CSV batch file containing the transactions to submit to Bankserv. |
avsUploadJson | POST /batch/avs/json | Upload AVS JSON transactions to submit to Bankserv. |
avsGetBatchTransactions
\Swagger\Client\Model\GetAvsTransaction[] avsGetBatchTransactions($id, $state)
Retrieve a list of transactions and the state of each transaction.
Retrieve a list of transactions and the state of each transaction for a specified batch id
.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\AVSApi();
$id = 56; // int | Batch `id` that needs to be retrieved.
$state = "state_example"; // string | Return only transactions with a specific state.
try {
$result = $api_instance->avsGetBatchTransactions($id, $state);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AVSApi->avsGetBatchTransactions: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Batch `id` that needs to be retrieved. | |
state | string | Return only transactions with a specific state. | [optional] |
Return type
\Swagger\Client\Model\GetAvsTransaction[]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
avsSubmitBatch
\Swagger\Client\Model\BatchSubmitResponse avsSubmitBatch($id)
Submit a AVS batch to Bankserv.
Manually submit a AVS batch to Bankserv for processing.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\AVSApi();
$id = 56; // int | Batch `id` that needs to be submitted to live system.
try {
$result = $api_instance->avsSubmitBatch($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AVSApi->avsSubmitBatch: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Batch `id` that needs to be submitted to live system. |
Return type
\Swagger\Client\Model\BatchSubmitResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
avsUploadCsv
\Swagger\Client\Model\BatchChecksum avsUploadCsv($file_data, $skip_cdv_check, $skip_checksum, $submit_to_bank)
Upload a AVS CSV batch file containing the transactions to submit to Bankserv.
Upload a correctly formatted CSV batch file (download example here). The file will be validated after returning an id
and MD5 checksum
. You can use the id
to check the progress of validation and checksum
to validate the integrity of the posted batch file.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\AVSApi();
$file_data = "/path/to/file.txt"; // \SplFileObject | Upload a correctly formatted CSV file ([download example here](https://dos.directdebit.co.za:31143/static/resources/DD__0001-AVS.csv)) to submit to Bankserv.
$skip_cdv_check = true; // bool | Skip CDV verification (Check Digit Verification).
$skip_checksum = true; // bool | Skip checking of duplicate batches.
$submit_to_bank = true; // bool | Set to `true` in order to submit transactions automatically to Bankserv. **ONLY VALID** transactions (if `skip_cdv_check = false`) and **ALL** transactions (if `skip_cdv_check = true`).
try {
$result = $api_instance->avsUploadCsv($file_data, $skip_cdv_check, $skip_checksum, $submit_to_bank);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AVSApi->avsUploadCsv: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_data | \SplFileObject | Upload a correctly formatted CSV file (download example here) to submit to Bankserv. | |
skip_cdv_check | bool | Skip CDV verification (Check Digit Verification). | [optional] |
skip_checksum | bool | Skip checking of duplicate batches. | [optional] |
submit_to_bank | bool | Set to `true` in order to submit transactions automatically to Bankserv. ONLY VALID transactions (if `skip_cdv_check = false`) and ALL transactions (if `skip_cdv_check = true`). | [optional] |
Return type
\Swagger\Client\Model\BatchChecksum
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
avsUploadJson
\Swagger\Client\Model\BatchCount avsUploadJson($transactions, $skip_cdv_check, $submit_to_bank)
Upload AVS JSON transactions to submit to Bankserv.
Upload an array of AVS JSON transactions you want to submit to Bankserv.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\AVSApi();
$transactions = array(new AvsBatchTransaction()); // \Swagger\Client\Model\AvsBatchTransaction[] | JSON transactions to be uploaded.
$skip_cdv_check = true; // bool | Skip CDV verification (Check Digit Verification).
$submit_to_bank = true; // bool | Set to `true` in order to submit transactions automatically to Bankserv. **ONLY VALID** transactions (if `skip_cdv_check = false`) and **ALL** transactions (if `skip_cdv_check = true`).
try {
$result = $api_instance->avsUploadJson($transactions, $skip_cdv_check, $submit_to_bank);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AVSApi->avsUploadJson: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
transactions | \Swagger\Client\Model\AvsBatchTransaction[] | JSON transactions to be uploaded. | |
skip_cdv_check | bool | Skip CDV verification (Check Digit Verification). | [optional] |
submit_to_bank | bool | Set to `true` in order to submit transactions automatically to Bankserv. ONLY VALID transactions (if `skip_cdv_check = false`) and ALL transactions (if `skip_cdv_check = true`). | [optional] |
Return type
\Swagger\Client\Model\BatchCount
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json