snadnee/php-abo-generator
最新稳定版本:v1.4.3
Composer 安装命令:
composer require snadnee/php-abo-generator
包简介
Generating of ABO files for mass payment orders
关键字:
README 文档
README
PHP ABO Generator is a lightweight PHP library for generating ABO files — a format commonly used by Czech banks for bulk payment processing.
This package provides a simple and structured way to create ABO files without any external dependencies.
Features
-
Create valid ABO files in pure PHP
-
Easy-to-use object-oriented API
-
Supports setting all key payment details.
Instalation
composer require snadnee/php-abo-generator
Basic usage
The basic usage of this package is simple. Here is an example.
use Snadnee\ABOGenerator\ABOGenerator; use Carbon\Carbon; $senderParams = [ 'bankAccount' => '11-123456789/0600', 'organisationName' => 'Company xyz', ]; $paymentGroups = [ 'group1' => [ 'dueDate' => Carbon::now(), 'payments' => [ [ 'amount' => 1.5, 'bankAccount' => '112-987654321/3030', 'variableSymbol' => 1234, 'specificSymbol' => 4321, 'constantSymbol' => 1234, 'message' => 'Payment', ], [ 'amount' => 1.5, 'bankAccount' => '112-987654321/3030', 'variableSymbol' => 1234, 'specificSymbol' => 4321, 'constantSymbol' => 1234, 'message' => 'Payment', ], ] ], ]; $ABOGenerator = new ABOGenerator(); $result = $ABOGenerator->simpleGenerating($senderParams, $paymentGroups);
Advanced usage
The ABO format is separated to these parts: files, groups and payments themselves.
Each file can have its own bank and type (payment, inkaso). Each group can have its own bank account number in the same bank and its due date (default is today). Each payment has an amount, a variable, specific, constant symbol, a message and a bank account.
use Snadnee\ABOGenerator\ABOGenerator; use Carbon\Carbon; $ABOGenerator = new ABOGenerator('Company name'); $file = $ABOGenerator->addFile(ABOGenerator::PAYMENT); $file->setSenderBank(0600); $group = $file->addGroup(); $group->setSenderAccount(1234567890) ->setDate(Carbon::now()); // AccountNumber, amount, variable symbol $group->addPayment("111-987654321/0300", 14323.43, 2220009813) ->setConstantSymbol('8') ->setSpecificSymbol('93653') ->setMessage('Message'); $group->addPayment("111-2424242424/0300", 1000.5, 2220009813) ->setConstantSymbol('8') ->setSpecificSymbol('93653') ->setMessage('Message'); $file2 = $ABOGenerator->addFile(ABOGenerator::INKASO); $file2->setSenderBank(0600); $group = $file2->addGroup(); $group->setSenderAccount(987654321); $group->addPayment("174-987654321/0300", 1.5, 2220009813) ->setConstantSymbol('8') ->setSpecificSymbol('93653') ->setMessage('Zprava 1'); $group->addPayment("174-987654321/0300", 1234, 2220009813) ->setConstantSymbol('8') ->setSpecificSymbol('93653') ->setMessage('Zprava 2'); $group = $file2->addGroup(); $group->setSenderAccount(227757331); $group->addPayment("174-987654321/0300", 100, 2220009813) ->setConstantSymbol('8') ->setSpecificSymbol('93653') ->setMessage('Zprava 1'); $group->addPayment("174-987654321/0300", 500, 2220009813) ->setConstantSymbol('8') ->setSpecificSymbol('93653') ->setMessage('Zprava 2'); $result = $ABOGenerator->generate();
统计信息
- 总下载量: 7.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-05