承接 joelwmale/php-aba 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

joelwmale/php-aba

最新稳定版本:1.0.1

Composer 安装命令:

composer require joelwmale/php-aba

包简介

Provides a simple way to generate an ABA file for batch transactions

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads GitHub last commit License Free

PHP ABA

Provides a simple way to generate an ABA file which can be used to mass import payments into Australian banks.

Features

  • Simple API
  • Laravel support via a service provider and facade
  • Framework agnostic

Requirements

  • PHP 8+

🚀 Getting Started

🔥 Installing

Install the package through Composer.

composer require joelwmale/php-aba

Integrations

Laravel integrations

Although Aba is framework agnostic, it does support Laravel out of the box and comes with a Service provider and Facade for easy integration.

After you have installed the Aba, open the config/app.php file which is included with Laravel and add the following lines.

In the $providers array add the following service provider.

Joelwmale\PhpAba\AbaServiceProvider::class

Add the facade of this package to the $aliases array.

'Aba' => Joelwmale\PhpAba\Facades\Aba::class,

You can now use this facade in place of instantiating the converter yourself in the following examples.

🧑‍🍳 Demo

use Joelwmale\PhpAba\PhpAba;

$aba = new PhpAba();

// descriptive record or file header
$aba->addFileDetails([
    'bank_name' => 'ANZ', // bank name
    'user_name' => 'John Doe', // account name or company
    'user_number' => '301500', // user number (as allocated by APCA).
    'description' => 'Payroll', // description
    'process_date'  => '010125' // DDMMYY - date for it to be processed by the bank
]);

// now you can add transactions
$aba->addTransaction([
    'bsb' => '111-111',
    'account_number' => '999999999',
    'account_name'  => 'John Doe',
    'reference' => 'Payroll',
    'remitter' => 'ACME Company',
    'trace_bsb' => '222-222', // the originating bank bsb
    'trace_account_number' => '888888888', // the originating bank account number
    'transaction_code' => '53', // see below for transaction codes
    'amount' => '250.87' // must be in whole dollars
]);

// generate the ABA file
$abaFileContent = $aba->generate(); 

📚 Documentation

Mutiple transactions

$transactions = [
    [
        'bsb' => '111-111',
        'account_number' => '999999999',
        'account_name' => 'John Doe',
        'reference' => 'Wages',
        'remitter' => 'ACME Company',
        'transaction_code' => '53',
        'trace_bsb' => '222-222',
        'trace_account_number' => '888888888',
        'amount' => '250.87'
    ],
    [
        'bsb' => '222-2222',
        'account_number' => '888888888',
        'account_name'  => 'Jane Doe',
        'reference' => 'Salary',
        'remitter' => 'ACME Company',
        'transaction_code'  => '50',
        'trace_bsb' => '222-222',
        'trace_account_number' => '888888888',
        'amount' => '300.01'
    ]
];

$aba->addTransactions($transaction);

$aba->generate();

Notes

Field Descriptions & Values

Field Description
Bank name Bank name must be 3 characters long and Capitalised. For example: CBA
BSB The valid BSB format is XXX-XXX.
Account number Account number must be up to 9 digits.
User name (Descriptive record) User or preferred name must be letters only and up to 26 characters long.
Account name (Detail record) Account name must be BECS characters only and up to 32 characters long.
User number User number which is allocated by APCA must be up to 6 digits long. The Commonwealth bank default is 301500.
Description (Descriptive record) Description must be up to 12 characters long and letters only.
Reference (Detail record) The reference must be BECS characters only and up to 18 characters long. For example: Wages.
Trace BSB The trace BSB must be in the format XXX-XXX.
Trace account number The trace account number must be up to 9 digits.
Remitter The remitter must be letters only and up to 16 characters long.

Transaction codes

Code Transaction Description
13 Externally initiated debit items
50 Externally initiated credit items with the exception of those bearing Transaction Codes
51 Australian Government Security Interest
52 Family Allowance
53 Pay
54 Pension
55 Allotment
56 Dividend
57 Debenture/Note Interest

Reference

统计信息

  • 总下载量: 991
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固