cuongnm/viet_qr_pay_generator
最新稳定版本:v1.0.0
Composer 安装命令:
composer require cuongnm/viet_qr_pay_generator
包简介
VietQR Pay Package
README 文档
README
Library supporting VietQR, VietQRPay
Installation
Use Composer to install the library. Also make sure you have enabled and configured the GD extension if you want to generate images.
composer require cuongnm/viet_qr_pay_generator
Import lib
{
"require": {
"cuongnm/viet_qr_pay_generator": "^1.0"
}
}
Tạo mã VietQRPay
use cuongnm\viet_qr_pay_generator\QRPay; $merchantId = '123456789'; // Replace with your merchant ID $acqId = '987654321'; // Replace with your acquirer ID $amount = 10000; // Amount in VND $ref = 'Test Transaction'; // Reference or description of the transaction $returnText = true; // Set to true to return text, false for image in base64 $content = QRPay::create() ->merchantId($merchantId) // merchant id ->acqId($acqId) // acquirer id ->amount($amount) // Money ->info($ref) // Ref ->category('5611') // Adding category ->returnText($returnText) // if true, return text. If false, return image in base64 ->generateVietQRPay(); // Debug output echo "\nGenerated VietQR content: " . $content . "\n"; // Generated VietQR content: {"code":200,"desc":"ok","data":"00020101021238560010A0000007270126000998765432101091234567890208QRIBFTTA5204561153037045405100005802VN62200816Test Transaction6304C3FA"}
Tạo mã VietQR
use cuongnm\viet_qr_pay\QRPay; $merchantId = '0102154778'; $merchantName = 'TUGIACOMPANY'; $store = 'TU GIA COMPUTER'; $terminal = 'TUGIACO1'; $qrPay = QRPay::initVNPayQR( $merchantId, $merchantName, $terminal, $terminal ); $content = $qrPay->build(); echo $content; // 00020101021126280010A0000007750110010531314453037045408210900005802VN5910CELLPHONES62600312CPSHN ONLINE0517021908061613127850705ONLHN0810CellphoneS63047685
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-08