baraja-core/fio-payment-authorizator

该软件包最新版本(v2.1.2)没有提供许可信息。

FIO支付授权器。

v2.1.2 2024-06-09 20:13 UTC

README


BRJ组织 Fio银行支付授权器 =============================

Integrity check

一个简单的软件包,用于通过API在您的银行账户中搜索支付并授权新订单。

📦 安装

建议使用 Composer 进行安装,您也可以在 PackagistGitHub 上找到该软件包。

安装时,只需使用以下命令

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

您可以通过创建内部类的实例来手动使用该软件包,或者注册DIC扩展将服务直接链接到Nette框架。

并通过Neon创建服务

services:
    - FioPaymentAuthorizator(%fio.privateKey%)

parameters:
    fio:
        privateKey: xxx

使用

在演示者中使用非常简单

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

📄 许可证

baraja-core/fio-payment-authorizator 在MIT许可证下授权。有关更多详细信息,请参阅LICENSE 文件。