PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/narmitech/banking-client-php.git"
}
],
"require": {
"narmitech/banking-client-php": "*@dev"
}
}
Then run composer install
.
Download the files and include autoload.php
:
require_once('/path/to/BankingClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
date_default_timezone_set('UTC');
Banking\Client\Configuration::getDefaultConfiguration()->setHost('{{default_base_url}}');
Banking\Client\Configuration::getDefaultConfiguration()->setAccessToken('{{default_api_key}}');
Banking\Client\Configuration::getDefaultConfiguration()->setSecret('{{default_api_secret}}');
$api_instance = new Banking\Client\Api\TransactionApi(new \Http\Adapter\Guzzle6\Client());
try {
$result = $api_instance->callList();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TransactionApi->callList: ', $e->getMessage(), PHP_EOL;
}
?>
To run the unit tests:
composer install
./vendor/bin/phpunit