petrknap/php-spaydqr
最新稳定版本:v3.1.0
Composer 安装命令:
composer require petrknap/php-spaydqr
包简介
Short Payment Descriptor (SPayD) with QR output
README 文档
README
PHP library designed to generate bank payments encoded as QR codes, making transactions faster and more convenient.
Usage
Below is a simple example of generating a QR code for a payment order directly in template:
use Money\Money; use PetrKnap\SpaydQr\QrCode; use PetrKnap\SpaydQr\Spayd; echo '<img src="' . QrCode::asDataUri( Spayd::create( account: 'CZ7801000000000000000123', amount: Money::CZK(79950), ), ) . '">';
The library allows you to customize payment details, such as adding a variable symbol:
use Money\Money; use PetrKnap\SpaydQr\Spayd; Spayd::create( account: 'CZ7801000000000000000123', amount: Money::CZK(79950), )->withVariableSymbol(20250323001);
Instead of specifying amount, you can use invoice to define invoice:
use Money\Money; use PetrKnap\SpaydQr\Spayd; Spayd::create( account: 'CZ7801000000000000000123', invoice: Spayd\Sind::create( id: 'FA20250323001', issueDate: new DateTime('2025-03-23'), amount: Money::CZK(79950), ), )->withVariableSymbol(20250323001);
Run composer require petrknap/spayd-qr to install it.
You can support this project via donation.
The project is licensed under the terms of the LGPL-3.0-or-later.
统计信息
- 总下载量: 17.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2019-05-21