lyenrowe / bill-parser
支付宝、微信和银联账单文件解析器
1.0.1
2019-03-13 08:13 UTC
Requires
- box/spout: ^2.7
This package is auto-updated.
Last update: 2024-09-06 18:58:38 UTC
README
解析支付宝、微信、银联账单文件。
解析支付平台账单文件,包括:支付宝,微信,银联等支付的账单文件。 账单文件可通过接口下载,也可财务下载。 使用非常简单,传递要解析的文件路径, 程序根据文件头部内容分析文件类型,然后使用相应解析类解析账单文件
用法
//$path bill file full path;
$parser = FileParserFactory::create($path);
$rows = $parser->getData();
// save to db or something
/*foreach (array_chunk($rows, 1000) as $piece) {
$model->insertIgnore($piece);
}*/
安装
通过 Composer。 要安装,只需将其添加到您的 composer.json 文件中
"lyenrowe/bill-parser": "^1.0",
或者运行以下命令
composer require lyenrowe/bill-parser:1.*
通过 Composer。 安装最新版本。将以下内容添加到您的 composer.json 文件中
"lyenrowe/bill-parser": "dev-master"
或者运行以下命令
composer require lyenrowe/bill-parser:dev-master