baraja-core/fio-payment-authorizator

There is no license information available for the latest version (v2.0.1) of this package.

FIO payment authorizator.

v2.0.1 2021-04-06 17:23 UTC

README

Integrity check

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

Install

By Composer:

composer require baraja-core/fio-payment-authorizator

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...
    }
);