ion-bazan/pl-qr-payment
Composer 安装命令:
composer require ion-bazan/pl-qr-payment
包简介
This library helps you generate payment QR codes for Polish bank mobile applications
README 文档
README
This library helps you generate payment QR codes for Polish bank mobile applications. This is useful in invoice generators, etc to let your customers pay event faster 💸.
Makes use of endroid/qr-code for QR-code generation but you can use any library, because the QR string is available via getQrString() method.
Please note, that this library is only suitable for Polish bank systems
Installation
Use Composer to install the library.
composer require ion-bazan/pl-qr-payment
Minimal usage example
use IonBazan\PaymentQR\Poland\QrPayment; $payment = new QrPayment( '4249000050026313017364142', // Account number 'Testowy odbiorca', // Recipient name 'Tytuł płatności', // Payment title 12345 // Amount in gr ); /** @var \Endroid\QrCode\QrCode $qrCode */ $qrCode = $payment->getQrCode(); // Do anything you want with the QrCode object header('Content-Type: '.$qrCode->getContentType()); echo $qrCode->writeString();
Advanced usage
use IonBazan\PaymentQR\Poland\QrPayment; $payment = new QrPayment( '4249000050026313017364142', // Account number 'Testowy odbiorca', // Recipient name 'Tytuł płatności', // Payment title 12345, // Amount in gr '5214349636', // Recipient NIP (optional) 'PL', // Country code (only PL is supported) (optional) '11223344', // Customer ID for Direct Debit (optional) '990066' // Invoobill ID (optional) ); $qrString = $payment->getQrString(); // You can encode it using the QR library of your choice ... echo $qrString; // ... or just print it for debug
Validation
Currently, this library does not offer any fancy validation. It tries to stop you from breaking things by stripping invalid characters but don't expect too much. You should already have your data valid before generating the QR code.
Footnotes
This library is a quick approach to implement so called Rekomendacja Związku Banków Polskich dotycząca kodu dwuwymiarowego („2D”), umożliwiającego realizację polecenia przelewu oraz aktywację usług bankowych na rynku polskim - wersja 1.0
According to that document, QR codes should have following parameters:
| Parameter | Value |
|---|---|
| Type | QR |
| Size | 250 px (min. 1.8 cm x 1.8 cm) |
| Error Correction | Low (L) |
| Encoding | UTF-8 |
License
This library is under the MIT license.
ion-bazan/pl-qr-payment 适用场景与选型建议
ion-bazan/pl-qr-payment 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 62.36k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2018 年 09 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「payment」 「invoice」 「Bank」 「polish」 「qr」 「wire」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ion-bazan/pl-qr-payment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ion-bazan/pl-qr-payment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ion-bazan/pl-qr-payment 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Symfony integration for Czech bank account library
Easy invoice generation using Laravel Eloquent
Check for holidays - localeaware
Laravel MPdf : Easily generate PDF files with arabic support
Szamlazz.hu integration for Laravel
A basic wrapper for citco/carbon which returns business days between two given dates.
统计信息
- 总下载量: 62.36k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-22