Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

narmi/banking-client-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BankingClient-php

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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.

Manual Installation

Download the files and include autoload.php:

require_once('/path/to/BankingClient-php/vendor/autoload.php');

Getting Started

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;
}
?>

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Author

[email protected]