Swagger\Client\NAEDOBatchesApi
| Method | HTTP request | Description |
|---|---|---|
| naedoUploadCsv | POST /batch/naedo | Upload a CSV batch file containing the transactions to submit to Bankserv. |
| naedoUploadJson | POST /batch/naedo/json | Upload JSON transactions to submit to Bankserv. |
naedoUploadCsv
\Swagger\Client\Model\BatchChecksum naedoUploadCsv($file_data, $action_date, $skip_cdv_check, $skip_checksum, $submit_to_bank, $tracking_days)
Upload a 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\NAEDOBatchesApi();
$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-NAEDO.csv)) to submit to Bankserv.
$action_date = "action_date_example"; // string | Action date `yyyy-mm-dd` (date on which the payment becomes effective).
$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`).
$tracking_days = 56; // int | The amount of days an account should be held for representment should the initial payment fail. Tracking day options available are `0` to `10`, `14`, `21` or `31` days. If tracking days are not set it will use amount of `tracking_days` specified in the batch or default to `0`.
try {
$result = $api_instance->naedoUploadCsv($file_data, $action_date, $skip_cdv_check, $skip_checksum, $submit_to_bank, $tracking_days);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NAEDOBatchesApi->naedoUploadCsv: ', $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. | |
| action_date | string | Action date `yyyy-mm-dd` (date on which the payment becomes effective). | [optional] |
| 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] |
| tracking_days | int | The amount of days an account should be held for representment should the initial payment fail. Tracking day options available are `0` to `10`, `14`, `21` or `31` days. If tracking days are not set it will use amount of `tracking_days` specified in the batch or default to `0`. | [optional] |
Return type
\Swagger\Client\Model\BatchChecksum
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
naedoUploadJson
\Swagger\Client\Model\BatchCount naedoUploadJson($transactions, $action_date, $skip_cdv_check, $submit_to_bank, $tracking_days)
Upload JSON transactions to submit to Bankserv.
Upload an array of 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\NAEDOBatchesApi();
$transactions = array(new NaedoBatchTransaction()); // \Swagger\Client\Model\NaedoBatchTransaction[] | JSON transactions to be uploaded.
$action_date = "action_date_example"; // string | Action date `yyyy-mm-dd` (date on which the payment becomes effective).
$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`).
$tracking_days = 56; // int | The amount of days an account should be held for representment should the initial payment fail. Tracking day options available are `0` to `10`, `14`, `21` or `31` days. If tracking days are not set it will use amount of `tracking_days` specified in the batch or default to `0`.
try {
$result = $api_instance->naedoUploadJson($transactions, $action_date, $skip_cdv_check, $submit_to_bank, $tracking_days);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NAEDOBatchesApi->naedoUploadJson: ', $e->getMessage(), PHP_EOL;
}
?>Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| transactions | \Swagger\Client\Model\NaedoBatchTransaction[] | JSON transactions to be uploaded. | |
| action_date | string | Action date `yyyy-mm-dd` (date on which the payment becomes effective). | [optional] |
| 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] |
| tracking_days | int | The amount of days an account should be held for representment should the initial payment fail. Tracking day options available are `0` to `10`, `14`, `21` or `31` days. If tracking days are not set it will use amount of `tracking_days` specified in the batch or default to `0`. | [optional] |
Return type
\Swagger\Client\Model\BatchCount
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json