承接 kaio-souza/pix-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kaio-souza/pix-php

最新稳定版本:v1.0

Composer 安装命令:

composer require kaio-souza/pix-php

包简介

A simple PIX generator

README 文档

README

A simple library to generate media / data to Copy and Paste Pix

Avalilable on Composer

composer require kaio-souza/pix-php

Requeriments

  • To generate Images, the ext php-gd needs to be enable

Instatiate Class

Using Constants to Params (more secure, in cases of update)

$pix = new PixGenerator([
    MandatoryConfig::PIX_KEY => 'teste@teste.com',
    MandatoryConfig::MERCHANT_NAME => 'Tester',
]);

Using String

$pix = new PixGenerator([
   'pix_key' => 'teste@teste.com',
   'merchant_name' => 'Tester',
]);

More Params

$pix = new PixGenerator([
    MandatoryConfig::PIX_KEY => 'teste@teste.com',
    MandatoryConfig::MERCHANT_NAME => 'Tester',
    OptionalConfig::MERCHANT_CITY => 'SAO PAULO', // 'SAO PAULO' is the DefaultValue
    OptionalConfig::CURRENCY => '986', // 986 = BRL | is the DefaultValue
    OptionalConfig::COUNTRY_CODE => 'BR', // 'BR' is the default Alpha2 value
]);

Get QRCode Text

echo $pix->getQrCodeText(20, 'Teste Lala');
// returns 00020126510014br.gov.bcb.pix0115teste@teste.com0210Teste Lala520400005303986540520,005802BR5906Tester6002BR62270523bca37b925af47abd511393463041FC2

Get QRCode Image

// returns QRCode PNG output
$code = $pix->getQrCode(20, 'Teste Lala');
// Save the output on file
file_put_contents('qr.png', $code);

or

$code = $pix->getBase64QrCode('14,50', 'Teste Lala');

// show QRCODE on HTML img tag
echo "<img src='data:image/png;base64, {$code}' />";

** The amount accepts a comma or dots to separate the decimal places

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固