reyesoft/crypto-qr
最新稳定版本:2.1.0
Composer 安装命令:
composer require reyesoft/crypto-qr
包简介
This library helps to generate QR codes for Crypto Address
README 文档
README
By Reyesoft
This library helps you generate QR codes for Crypto Address. Makes use of endroid/qr-code. Further extended with Twig extensions, generation routes, a factory and a
Installation
Use Composer to install the library.
$ composer require reyesoft/crypto-qr
Basic usage
use Reyesoft\CryptoQr\BitcoinQr; $qr = new BitcoinQr('3PrCdjyjcDHDSC8tvVgx1u96tMK9juncHs'); header('Content-Type: '.$qr->getQrCode()->getContentType()); echo $qr->getQrCode()->writeString();
Advanced usage
use Reyesoft\CryptoQr\BitcoinQr; // Create a basic QR code $qr = new BitcoinQr('3PrCdjyjcDHDSC8tvVgx1u96tMK9juncHs'); $qr->getQrCode()->setSize(300); $qr->setAmount(0.01); $qr->setLabel('Caritas'); $qr->setMessage('Donation for project Maria'); // Directly output the QR code header('Content-Type: '.$qr->getQrCode()->getContentType()); echo $qr->getQrCode()->writeString(); // Save it to a file $qr->getQrCode()->writeFile(__DIR__.'/qrcode.png');
getQrCode() return a instance of Endroid\QrCode\QrCode, then you have more options for your QR on
endroid/qr-code.
Testing
composer test
sh autofix.sh
PHP 8.4
docker run -it --rm --name php84 -e PHP_EXTENSIONS="gd" -v "$PWD":/usr/src/app thecodingmachine/php:8.4-v4-cli bash
统计信息
- 总下载量: 47.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-23
