PHP code example of abwebdevelopers / aba-generator
1. Go to this page and download the library: Download abwebdevelopers/aba-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/ */
use ABWebDevelopers\AbaGenerator\Aba;
$aba = new Aba();
// Descriptive record or file header
// The header information is => 'Your account name', // Account name
'bsb' => '062-111', // bsb with hyphen
'account_number' => '101010101', // account number
'remitter' => 'Name of remitter', // Remitter
'user_number' => '301500', // User Number (as allocated by APCA). The Commonwealth bank default is 301500
'description' => 'Payroll', // description
'process_date' => '270616' // DDMMYY - Date to be processed
]);
// Add a transaction or Detail record
$aba->addTransaction([
'bsb' => '111-111', // bsb with hyphen
'account_number' => '999999999',
'account_name' => 'Jhon doe',
'reference' => 'Payroll number',
'transaction_code' => '53',
'amount' => '250.87'
]);
$abaFileContent = $aba->generate(); // Generate ABA string.
$aba->download();