baraja-core/fio-payment-authorizator

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

FIO payment authorizator.

v1.1.0 2020-03-24 21:03 UTC

This package is auto-updated.

Last update: 2020-05-07 18:26:58 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...
    }
);