2017 © Pedro PelĆ”ez
 

library fio

Read JSON file from Fio bank and can send request.

image

h4kuna/fio

Read JSON file from Fio bank and can send request.

  • Thursday, April 5, 2018
  • by h4kuna
  • Repository
  • 8 Watchers
  • 31 Stars
  • 17,275 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 13 Forks
  • 7 Open issues
  • 22 Versions
  • 8 % Grown

The README.md

Fio

Downloads this Month Latest Stable Version Coverage Status Total Downloads License, (*1)

Support Fio API. Read is provided via json file., (*2)

Versions

Here is changlog, (*3)

Nette framework

Follow this extension., (*4)

Installation to project by composer

$ composer require h4kuna/fio

Not implemented

  • 5.3.1.7: STA (MT940)
  • 5.3.2: Transakce z POS terminĆ”lÅÆ nebo platebnĆ­ brĆ”ny obchodnĆ­ka
  • 6.4.2: pain.008 (příkazy k inkasu)
  • only json for read movements
  • only xml for import

How to use

Here is example and run via cli. This script require account.ini in same directory, whose looks like., (*5)

[my-account]
account = 123456789
token = abcdefghijklmn

[wife-account]
account = 987654321
token = zyxuvtsrfd

FioFactory class help you create instances of classes FioPay and FioRead., (*6)

use h4kuna\Fio;

$fioFactory = new Fio\FioFactory(parse_ini_file($ini, true));

$fioRead = $fioFactory->createFioRead('my-account');
$fioPay = $fioFactory->createFioPay('wife-account');

$fioRead2 = $fioFactory->createFioRead(); // first in list is default, [my-account]

You can use different config bud keep structure of php array, (*7)

[
    'my-alias' => [
        'account' => '123456789',
        'token' => 'abcdefg'
    ],
    'next-alias' => [
        'account' => '987654321',
        'token' => 'tuvwxyz'
    ]
]

Reading

Keep on mind, all items like variable symbol, constant symbol and specific symbol can to have zeros from left side., (*8)

Read range between date.

use h4kuna\Fio;
/* @var $fioRead Fio\FioRead */
/* @var $list Fio\Read\TransactionList */
$list = $fioRead->movements(/* $from, $to */); // default is last week

foreach ($list as $transaction) {
    /* @var $transaction Fio\Read\Transaction */
    var_dump($transaction->moveId);
    foreach ($transaction as $property => $value) {
        var_dump($property, $value);
    }
}

var_dump($list->getInfo());

You can download transaction by id of year.

use h4kuna\Fio;
/* @var $fioRead Fio\FioRead */
/* @var $list Fio\Read\TransactionList */
$list = $fioRead->movementId(2, 2015); // second transaction of year 2015

Very useful method where download last transactions.

After download it automatic set new break point., (*9)

use h4kuna\Fio;
/* @var $fioRead Fio\FioRead */
/* @var $list Fio\Read\TransactionList */
$list = $fioRead->lastDownload();
// same use like above
var_dump($list->getInfo()->idLastDownload);

Change your break point.

By date., (*10)

$fioRead->setLastDate('1986-12-30');
$list = $fioRead->lastDownload();
var_dump($list->getInfo()->idLastDownload);

By movement ID., (*11)

$fioRead->setLastId(123456789);
$list = $fioRead->lastDownload();
var_dump($list->getInfo()->idLastDownload); // 123456789

Tip: You can define own TransactionFactory and create instance and add to Read\Json::__construct(), (*12)

Payment (writing)

Api has three response languages, default is set cs. For change:, (*13)

/* @var $fioPay h4kuna\Fio\FioPay */
$fioPay->setLanguage('en');

For send request is method send whose accept, file path to your xml or abo file or instance of class Property., (*14)

$myFile = '/path/to/my/xml/or/abo/file.xml'; // file extension is important
$fioPay->send($myFile);

Object pay only to czech or slovak:, (*15)

/* @var $national Fio\Pay\Payment\National */
$national = $fioPay->createNational($amount, $accountTo);
$national->setVariableSymbol($vs);
/* set next payment property $national->set* */
$fioPay->send();

Euro zone payment:, (*16)

/* @var $euro Fio\Pay\Payment\Euro */
$euro = $fioPay->createEuro($amount, $accountTo, $name);
$euro->setVariableSymbol($vs);
/* set next payment property $euro->set* */
$fioPay->send();

International payment:, (*17)

/* @var $international Fio\Pay\Payment\International */
$international = $fioPay->createInternational($amount, $accountTo, $bic, $name, $street, $city, $country, $info);
$international->setRemittanceInfo2('foo');
/* set next payment property $international->set* */
$fioPay->send();

Send more payments in one request:, (*18)

foreach($pamentsRows as $row) {
    /* @var $national Fio\Pay\Payment\National */
    $national = $fioPay->createNational($row->amount, $row->accountTo);
    $national->setVariableSymbol($row->vs);
}
$fioPay->send();

The Versions

05/04 2018

dev-service-unvaliable

dev-service-unvaliable https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

05/04 2018

dev-php7.1

dev-php7.1 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

18/02 2018

dev-master

9999999-dev https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

18/02 2018

dev-php72-add-travis

dev-php72-add-travis https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

27/11 2017

v1.3.3

1.3.3.0 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

23/06 2017

dev-add-movement-by-card

dev-add-movement-by-card https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

25/04 2017

dev-php-7.1

dev-php-7.1 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

19/12 2016

v1.3.2

1.3.2.0 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

03/10 2016

v1.3.1

1.3.1.0 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

01/02 2016

v1.3.0

1.3.0.0 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

09/01 2016

v1.2.1

1.2.1.0 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

30/05 2015

v1.2.0

1.2.0.0 https://github.com/h4kuna/fio

Read JSON file from Fio bank and can send request.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Milan Matějček

11/03 2014

v1.1.5

1.1.5.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

31/01 2014

v1.1.4

1.1.4.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

06/06 2013

v1.1.3

1.1.3.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

20/05 2013

v1.1.2

1.1.2.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

11/03 2013

v1.1.1

1.1.1.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

25/02 2013

v1.1.0

1.1.0.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

27/10 2012

v1.0.3

1.0.3.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

13/10 2012

v1.0.2

1.0.2.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

12/10 2012

v1.0.1

1.0.1.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček

12/10 2012

v1.0.0

1.0.0.0 https://github.com/h4kuna/fio

Read email or gpc file from Fio bank

  Sources   Download

MIT

The Requires

 

by Milan Matějček