baytek / eft
Package for Generating 80 byte EFT files
1.0.5
2018-08-20 20:45 UTC
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: ^7
README
To generate an EFT there are a few details that are required from your bank account:
- CPA
- OriginatorName
- Institution
- Transit
- Account
$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()}";