Download the PHP package datalinx/php-upn-qr-generator without Composer
On this page you can find all versions of the php package datalinx/php-upn-qr-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download datalinx/php-upn-qr-generator
More information about datalinx/php-upn-qr-generator
Files in datalinx/php-upn-qr-generator
Package php-upn-qr-generator
Short Description QR code generator for Slovenian UPN payment order
License MIT
Informations about the package php-upn-qr-generator
UPN QR code generator for PHP
About
Using this library you can generate a QR code for a UPN payment order, which is used in Slovenia. The technical specification is defined by the Slovenian Bank Association.
This library can output a PNG, SVG or EPS image to a local file.
The code is fully tested, including OCRing of the generated QR code.
Requirements
- PHP >= 7.4
- mbstring and iconv PHP extensions
- imagick PHP extension, but only if you want to generate PNG (raster) QR code images — not required for vector formats (SVG, EPS)
Installing
Download it with composer: `
Usage
In order to generate a QR code you need to pass at least these parameters:
- recipientIban
- recipientCity
The minimal required parameters are based on the Android applications ISPS and Banka IN offered by the Intesa Sanpaolo Bank Slovenia.
See class docblocks for accepted parameter formats and length.
Sample code
This code shows a typical use-case. See the UPNQR class for more stuff you can put into the QR code.
The above code will generate this QR code:
Contributing
If you have some suggestions how to make this package better, please open an issue or even better, submit a pull request.
Should you want to contribute, please see the development guidelines in the DataLinx PHP package template.
Developer documentation
- QR code technical specification (see chapter 5.2)
Changelog
All notable changes to this project are automatically documented in the release-please GitHub action.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
For all this to work, commit messages must follow the Conventional commits specification, which is also enforced by a Git hook.