andrew-svirin / cfonb-php
CFONB 120 签名、240 交易的 PHP 解析器。EBICS 的辅助工具。
0.1.0
2021-01-29 12:37 UTC
Requires
- php: ^7.2 || ^8
Requires (Dev)
- phpstan/phpstan: ^0.12.57
- phpunit/phpunit: ^8.5 | ^9.1
- squizlabs/php_codesniffer: ^3.3
This package is auto-updated.
Last update: 2024-09-09 01:34:48 UTC
README
CFONB 语句(120c)、转账(240c)的 PHP 解析器
支持 CFONB 120 签名和 CFONB 240 交易格式。
EBICS 客户端 PHP 的辅助工具 EBICS Client PHP
安装
$ composer require andrew-svirin/cfonb-php
如何使用
<?php $parser = new \Silarhi\Cfonb\CfonbParser(); //Gets all statements day by day foreach($parser->read120C('My Content') as $statement) { if ($statement->hasOldBalance()) { echo sprintf("Old balance : %f\n", $statement->getOldBalance()->getAmount()); } foreach($statement->getOperations() as $operation) { //Gets all statement operations } if ($statement->hasNewBalance()) { echo sprintf("New balance : %f\n", $statement->getNewBalance()->getAmount()); } }
<?php $parser = new \Silarhi\Cfonb\CfonbParser(); //Gets all statements day by day foreach($parser->read240C('My Content') as $transfer) { if ($transfer->getHeader()) { echo sprintf("Header op code : %f\n", $transaction->getHeader()->getOperationCode()); } foreach($transfer->getTransactions() as $transactions) { //Gets all statement operations } if ($transaction->getTotal()()) { echo sprintf("Total transfer amount : %f\n", $transaction->getTotal()->getTotalAmount()); } }