baytek / eft
生成80字节EFT文件的包
1.0.5
2018-08-20 20:45 UTC
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: ^7
README
要生成EFT文件,需要从您的银行账户提供一些详细信息
- CPA
- 发起人姓名
- 机构
- 过户
- 账户
$eft = new EFT(); $eft->initialize([ 'originatorId' => 'fklssasdfa', 'transactionType' => 'C', 'cpa' => '123', 'dueDate' => '140618', //ddmmyy 'originatorName' => 'INCORPORATED INC.', 'institutionTransit' => '000412345', 'account' => '12345678910 ', 'fileCreationNumber' => '1', ]); foreach (range(0, rand(5, 50)) as $i) { $eft->addDetail(new Detail([ 'name' => 'This is a test', 'referenceNumber' => 'INV-1808-' . str_pad(rand(0, 999999), 6, "0", STR_PAD_LEFT), 'institutionTransit' => '000412345', 'account' => rand(5, 99999999), 'amount' => rand(0, 99999999), ])); } $eft->finalize(); echo "<pre>{$eft->export()}";