Componette

Componette

baraja-core

baraja-core / fio-payment-authorizator v2.1.0

Fio bank payment authorizator

download-cloud-line composer require baraja-core/fio-payment-authorizator

Fio bank payment authorizator

Integrity check

Simple package for search payments in your bank account by API and authorize new orders.

๐Ÿ“ฆ Installation

It's best to use Composer for installation, and you can also find the package on Packagist and GitHub.

To install, simply use the command:

$ composer require baraja-core/fio-payment-authorizator

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

And create service by Neon:

services:
    - FioPaymentAuthorizator(%fio.privateKey%)

parameters:
    fio:
        privateKey: xxx

Use

In presenter use very simply:

/** @var FioPaymentAuthorizator $fio **/
$fio = $this->context->getByType(FioPaymentAuthorizator::class);

// Or simply:

$fio = new FioPaymentAuthorizator('private-key');

dump($fio->process()); // Get last month bank data as TransactionResult.

// Check account and authorize new orders

$unauthorizedVariables = [];

$fio->authOrders(
    $unauthorizedVariables,
    function (Transaction $transaction): void {
        // Do something...
    }
);

๐Ÿ“„ License

baraja-core/fio-payment-authorizator is licensed under the MIT license. See the LICENSE file for more details.

bar-chart-fill

Statistics

download-cloud-fill
2697
star-fill
3
bug-fill
0
flashlight-fill
1.6y
price-tag-2-line

Badges

guide-fill

Dependencies

php (>=7.1.0)
Componette Componette felix@nette.org