ardani / fio-payment-wrapper
PHP Fio API Wrapper
1.0.1
2019-11-04 06:21 UTC
Requires
- php: >=7.1
- ext-curl: *
- guzzlehttp/guzzle: ~6.1
Requires (Dev)
- php-coveralls/php-coveralls: ^1.0
- phpunit/phpunit: ~6.3
- squizlabs/php_codesniffer: ~3.0
Suggests
- composer/ca-bundle: Provides regularly updated root certificates list
This package is auto-updated.
Last update: 2024-11-04 17:16:31 UTC
README
Fio bank REST API implementation in PHP. It allows you to download and iterate through account balance changes.
Usage
- Install the latest version with
composer require ardani/fio-payment-wrapper
- Create a token in the ebanking (Nastavení / API)
- Use it according to the example bellow and check the docblocks
Downloading
<?php require_once 'vendor/autoload.php'; $downloader = new FioApi\Downloader('TOKEN@todo'); $transactionList = $downloader->downloadSince(new \DateTimeImmutable('-1 week')); foreach ($transactionList->getTransactions() as $transaction) { var_dump($transaction); //object with getters }
Uploading
Domestic payment (in Czechia)
<?php require_once 'vendor/autoload.php'; $token = get_your_fio_token(); $uploader = new FioApi\Uploader($token); // currency, iban, bic is not needed $account = new FioApi\Account('XXXXXXXXXX', 'ZZZZ', NULL, NULL, NULL); $tx = Transaction::create((object) [ 'accountNumber' => 'YYYYYYYYYY', 'bankCode' => 'WWWW', 'date' => new \DateTime('2016-07-20'), 'amount' => 6.66, 'currency' => 'CZK', 'userMessage' => 'money wasting', 'comment' => 'fioapi.test' ]); $builder = new FioApi\DomesticPaymentBuilder(); $request = $builder->build($account, [$tx]); $response = $uploader->sendRequest($request); echo $response->getStatus();
Requirements
Fio API PHP works with PHP 7.1 or higher.
Submitting bugs and feature requests
Bugs and feature request are tracked on GitHub