fontis/bpay-ref-generator

This package is abandoned and no longer maintained. No replacement package was suggested.

Generate BPAY customer reference numbers

2.0.1 2021-02-20 03:39 UTC

This package is auto-updated.

Last update: 2022-12-20 07:34:53 UTC


README

This package provides a convenient way of generating customer reference numbers for BPAY. There are functions to calculate reference numbers based on both the MOD 10 Version 1 and MOD 10 Version 5 algorithms.

The recommended way to install this package is using Composer. If you don't already have Composer installed, you can install it using the instructions mentioned on the Composer documentation. Once you have composer installed, just install it like so:

composer require fontis/bpay-ref-generator 1.0.*

Using this package is very simple. Instantiate an instance of the Generator class like so:

use Fontis\BpayRefGenerator\Generator;

$generator = new Generator();

Then call the appropriate method based on which algorithm you want to use. For MOD 10 Version 1:

$ref = $generator->calcMod10V1("10000456");
// 100004563

For MOD 10 Version 5:

$ref = $generator->calcMod10V5("40007923");
// 400079231