Swagger\Client\EFTBatchesApi
Method | HTTP request | Description |
---|---|---|
eftUploadCsv | POST /batch/eft | Upload a CSV batch file containing the transactions to submit to Bankserv. |
eftUploadJson | POST /batch/eft/json | Upload JSON transactions to submit to Bankserv. |
eftUploadCsv
\Swagger\Client\Model\BatchChecksum eftUploadCsv($file_data, $service_type, $action_date, $skip_cdv_check, $skip_checksum, $submit_to_bank)
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\EFTBatchesApi();
$file_data = "/path/to/file.txt"; // \SplFileObject | Upload a correctly formatted CSV file ([download example here](https://dos.directdebit.co.za:31143/static/resources/directdebit-example-eft-batch.csv)) to submit to Bankserv.
$service_type = "service_type_example"; // string | Service type can be either `sameday` or `twoday`.
$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 batch files.
$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->eftUploadCsv($file_data, $service_type, $action_date, $skip_cdv_check, $skip_checksum, $submit_to_bank);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EFTBatchesApi->eftUploadCsv: ', $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. | |
service_type | string | Service type can be either `sameday` or `twoday`. | [optional] |
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 batch files. | [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
eftUploadJson
\Swagger\Client\Model\BatchCount eftUploadJson($transactions, $service_type, $action_date, $skip_cdv_check, $submit_to_bank)
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\EFTBatchesApi();
$transactions = array(new BatchTransaction()); // \Swagger\Client\Model\BatchTransaction[] | JSON transactions to be uploaded.
$service_type = "service_type_example"; // string | Service type can be either `sameday` or `twoday`.
$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`).
try {
$result = $api_instance->eftUploadJson($transactions, $service_type, $action_date, $skip_cdv_check, $submit_to_bank);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EFTBatchesApi->eftUploadJson: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
transactions | \Swagger\Client\Model\BatchTransaction[] | JSON transactions to be uploaded. | |
service_type | string | Service type can be either `sameday` or `twoday`. | [optional] |
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] |
Return type
\Swagger\Client\Model\BatchCount
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json