sprain/swiss-qr-bill
Composer 安装命令:
composer require sprain/swiss-qr-bill
包简介
A PHP library to create Swiss QR bills
README 文档
README
A PHP library to create Swiss QR Bill payment parts (QR-Rechnung).
Getting started
composer require sprain/swiss-qr-bill
Then have a look at example/example.php.
FAQs
-
Why is my IBAN not working?
A typical QR bill (example) requires a special QR IBAN. You can get yours from your bank. A classic IBAN can be used for QR bills with a SCOR reference (example) or no reference number at all (example). -
How do I recognize a QR IBAN?
In a QR IBAN, the institute id, which is defined in the 5th to 9th character, is a number in the range of 30000 to 31999. (Example: CH44 3199 9123 0008 8901 2). For how to detect it in code, see #182 (comment) -
How do I create QR bills for international IBANs?
You can't. The QR bill by specification only supports IBANs from Switzerland and Liechtenstein. -
How do I create QR bills for amounts in currencies other than CHF or EUR?
You can't. The QR bill by specification only supports CHF and EUR. -
How do I change translations to use my own wording?
You can't. The translations are defined in the QR bill specification and are not meant to be changed by the user. See this document, page 31. -
How do I make my QR bills payable by Twint?
See #129 -
What PDF libraries are supported by this library?
The following libraries are currently actively supported:- fpdf/fpdf
- tecnickcom/tcpdf
- setasign/fpdi (accepted by
FpdfOutputandTcPdfOutput)
The output of
HtmlOutputis known to be used to generate PDFs with PrinceXML, Docraptor, and dompdf/dompdf (with some adjustments as decribed here) -
Why are you using
finalon most classes? I want to extend them!
This library implements the official specification of the QR bill. This implementation is not supposed to be adjusted as it might result in broken QR bills. Therefore many classes are marked as final. If you find the need to extend one of those final classes, you might have found a bug in this library. In that case it will be very helpful if you provide a bug report or even a pull request. Thank you!
Getting help
Do you need more help using this library?
- Search the existing and closed issues to see if you find your answer there.
- If you still need help, you may create an issue yourself to ask your question.
Please note that the maintainer of this library will not provide any support by email. The beauty of open source software lies in the fact that everybody can benefit from each other. Therefore questions will only be answered in public.
Versioning
Semantic versioning is used for this library.
In addition, a minor version will always be published if any visible change in the output of the qr code or the payment part takes place, even if it could be considered to be just a bugfix.
PHP version support
This library supports a PHP version as long as it accounts for at least approximately 10% of current installations.
Dependency support
Older versions of dependencies are supported as long as they do not hinder further development or account for at least approximately 10% of current installations of the corresponding dependency.
Support the project
- Do you like this project? Consider a Github sponsorship.
- Would you like to contribute? Have a look at the open issues. Be nice to each other.
- Spread the word!
Official resources
The repository contains the official specifications the library is based on:
- Swiss Implementation Guidelines QR-bill
- Technical information about the QR-IID and QR-IBAN
- Style Guide QR-bill
- Validation Tool
For more official information see
For contributors of this library
How to generate new test data:
- Set
$regenerateReferenceFiles = trueinTraitValidQrBillsProvider composer update --prefer-lowestvendor/bin/phpunit– ignore failing tests intestQrFilecomposer updatevendor/bin/phpunit– there should be no more errors- Set
$regenerateReferenceFiles = falseinTraitValidQrBillsProvider
sprain/swiss-qr-bill 适用场景与选型建议
sprain/swiss-qr-bill 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 2.25M 次下载、GitHub Stars 达 329, 最近一次更新时间为 2018 年 02 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 sprain/swiss-qr-bill 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sprain/swiss-qr-bill 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.25M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 330
- 点击次数: 39
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-12
