PHP code example of simonblee / aba-file-generator

1. Go to this page and download the library: Download simonblee/aba-file-generator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

simonblee / aba-file-generator example snippets


use AbaFileGenerator\Model\Transaction;
use AbaFileGenerator\Generator\AbaFileGenerator;

$generator = new AbaFileGenerator(
    '123-456', // bsb
    '12345678', // account number
    'CBA', // bank name
    'User Name',
    'Remitter',
    '175029', // direct entry id for CBA
    'Payroll' // description
);

// Set a custom processing date if 

$transaction = new Transaction();
$transaction->setAccountName(...);
$transaction->setAccountNumber(...);
$transaction->setBsb(...);
$transaction->setTransactionCode(...);
$transaction->setReference(...);
$transaction->setAmount(...);

$abaString = $generator->generate($transaction); // $transaction could also be an array here
file_put_contents('/my/aba/file.aba', $abaString);