定制 reyesoft/crypto-qr 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

bitcoin qr

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

GitHub 信息

  • Stars: 6
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-23