Skip to content

PHP library to generate aba files for performing bulk transactions with Australian and New Zealand banks.

Notifications You must be signed in to change notification settings

simonblee/aba-file-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABA File Generator

Overview

Generates an aba file for bulk banking transactions with Australian banks.

License

MIT License

Installation

Copy the files where needed or install via composer:

composer require simonblee/aba-file-generator

Usage

Create a generator object with the descriptive type information for this aba file:

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 required
$generator->setProcessingDate('tomorrow');

Create an object or array of objects implementing AbaFileGenerator\Model\TransactionInterface. A simple Transaction object is provided with the library but may be too simple for your project:

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

Generate the aba string and save into a file (or whatever else you want):

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

References

About

PHP library to generate aba files for performing bulk transactions with Australian and New Zealand banks.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •