This library generates Payment References for use with SIMO Banking System (Mozambique)
Install using composer
composer require abdulmueid/entity-reference
Here is a sample:
<?php
require_once "vendor/autoload.php";
$entity = '202020';
$amount = '500';
$referencesToGenerate = 10;
$generator = new abdulmueid\EntityReference\Generator();
// Generate a reference
$reference = $generator->generateReference($entity, $amount);
// Validate Reference, should return true
$generator->isReferenceValid($entity, $amount, $reference); // Should return true
// Generate n number of references
// Should return an array with valid references
$references = $generator->generateReferences($entity, $amount, $referencesToGenerate);
Run tests using phpunit
phpunit tests/GeneratorTest.php
See LICENSE.md