Swagger\Client\CDVApi
Method | HTTP request | Description |
---|---|---|
account | GET /cdv/account | Validate a bank account number. |
branch | GET /cdv/branch | Validate a branch code. |
validateCdvBatch | POST /cdv/batch | Upload a CSV batch file containing transactions to validate before submitting. |
account
\Swagger\Client\Model\AccountCdvCheck account($account_number, $branch_code, $account_type)
Validate a bank account number.
Validate a bank account number.
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\CDVApi();
$account_number = "account_number_example"; // string | The bank account number provided by the customer.
$branch_code = "branch_code_example"; // string | The branch code of the specific bank (usually a 6 digit code).
$account_type = "account_type_example"; // string | The bank account type (current, savings, transmission or bond).
try {
$result = $api_instance->account($account_number, $branch_code, $account_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CDVApi->account: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
account_number | string | The bank account number provided by the customer. | |
branch_code | string | The branch code of the specific bank (usually a 6 digit code). | |
account_type | string | The bank account type (current, savings, transmission or bond). | [optional] |
Return type
\Swagger\Client\Model\AccountCdvCheck
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Top](#) | [API list](../../README.html#documentation-for-api-endpoints) | [Model list](../../README.html#documentation-for-models) | [Index](../../README.html)
branch
\Swagger\Client\Model\BranchCdvCheck branch($branch_code)
Validate a branch code.
Validate a branch code.
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\CDVApi();
$branch_code = "branch_code_example"; // string | The branch code of the specific bank (usually a 6 digit code).
try {
$result = $api_instance->branch($branch_code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CDVApi->branch: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
branch_code | string | The branch code of the specific bank (usually a 6 digit code). |
Return type
\Swagger\Client\Model\BranchCdvCheck
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Top](#) | [API list](../../README.html#documentation-for-api-endpoints) | [Model list](../../README.html#documentation-for-models) | [Index](../../README.html)
validateCdvBatch
\Swagger\Client\Model\CdvTransaction[] validateCdvBatch($file_data)
Upload a CSV batch file containing transactions to validate before submitting.
Upload a correctly formatted CSV batch file (download example here) to validate.
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\CDVApi();
$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 validate.
try {
$result = $api_instance->validateCdvBatch($file_data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CDVApi->validateCdvBatch: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file_data | \SplFileObject | Upload a correctly formatted CSV file (download example here) to validate. |
Return type
\Swagger\Client\Model\CdvTransaction[]
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
[Top](#) | [API list](../../README.html#documentation-for-api-endpoints) | [Model list](../../README.html#documentation-for-models) | [Index](../../README.html)