abdulmueid / entity-reference
莫桑比克SIMO银行系统的实体引用生成器
1.0.0
2020-07-28 19:45 UTC
Requires (Dev)
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-09-29 05:36:26 UTC
README
这个库生成用于莫桑比克SIMO银行系统的支付引用
安装
使用composer安装
composer require abdulmueid/entity-reference
用法
这里是一个示例
<?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);
测试
使用phpunit运行测试
phpunit tests/GeneratorTest.php