Download the PHP package sasa-b/php-bihupp-qrcode without Composer

On this page you can find all versions of the php package sasa-b/php-bihupp-qrcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-bihupp-qrcode

php-bihupp-qrcode

PHP biblioteka koja implementira BIHUPP10 standard QR koda za instrukcije bankovnog plaćanja u Bosni i Hercegovini.

BIHUPP (Bosansko-hercegovački unutrašnji platni promet) definiše strukturirani tekstualni sadržaj koji se može enkodirati u obliku QR koda, koji banke skeniraju kako bi automatski popunile naloge za plaćanje. Ovaj format je ustanovljen od strane Udruženja Banaka Bosne i Hercegovine.

Dodavanje QR koda u definisanom formatu na računima omogućava krajnjim korisnicima plaćanje pomoću skeniranja QR koda kroz njihovo mobilno bankarstvo.

Za Kotlin biblioteku idite na kotlin-bihupp-qrcode.

Da biste verifikovali validnost QR koda ili da ga generišete ručno, koristite s-co.tech/bihupp-qrcode-verifikator


PHP library implementing the BIHUPP QR Code standard for bank payment instructions in Bosnia and Herzegovina.

BIHUPP (Bosansko-Hercegovački Unutrašnji Platni Promet) defines a structured text payload that can be encoded as a QR code that banks scan to pre-fill payment forms. This format was established by the Association of Banks of Bosnia and Herzegovina.

Adding a QR code in the defined format to invoices enables end-users to make payments by scanning the QR code through their mobile banking app.

For Kotlin library go to kotlin-bihupp-qrcode.

To verify validity of the QR Code or to generate one manually, use s-co.tech/bihupp-qrcode-verifikator

Table of contents

Requirements

Installation

Quick start

Usage

Standard bank transfer

Omitting the sender

When sender is omitted, the bank pre-fills payer details from the logged-in user's session.

Multiple recipient accounts

Up to 20 recipient accounts can be specified.

Including a sender phone number

Public revenue payment (tax, fees, etc.)

Public revenue payments require additional fields grouped in a PublicRevenueInstruction object.

Reading the payload string

PaymentInstruction implements Stringable. Cast it to string to inspect or store the raw BIHUPP payload, or get an array of lines with lines():

QR code output

SVG (default)

PNG / JPEG — GD extension

Requires the gd extension. Throws MissingImageExtension if it is not loaded.

PNG / JPEG — Imagick extension

Requires the imagick extension. Throws MissingImageExtension if it is not loaded.

Base64 data-URI link

Base64Link wraps any ImageRenderStrategy and returns a base64 data URI. Defaults to SVG when no strategy is passed.

Custom renderer

Implement Renderer and RenderStrategy to integrate any QR library or add custom options (logo overlay, colours, size, etc.):

Reading a QR code

Use Reader::read() to scan a BIHUPP QR code image and reconstruct a PaymentInstruction from it. Pass either a file path or a binary blob as the source.

By default GD is used to decode the image. Pass ImageExtension::Imagick as the second constructor argument to use Imagick instead:

Field reference

PaymentInstruction constructor

Parameter Type Required Default Notes
sender Sender No — Pass null to let the bank auto-fill
recipient Recipient Yes —
purpose PaymentPurpose Yes — Max 110 chars
reference PaymentReference\|null No — Pass null to omit
amount Amount Yes — Integer in pennies (pfeninga)
currency Currency Yes BAM Hardcoded to BAM by standard
paymentPriority PaymentPriority No N (regular)
publicRevenue PublicRevenue\|null No null Required only for tax/fee payments
version Version Yes BIHUPP10

Field constraints

Sender / Recipient

Field Class Max length Format
Name Name 50 Alphanumeric + allowed chars
Address line 1 AddressLine1 50 Street + number
Address line 2 AddressLine2 25 Postcode + city
Phone PhoneNumber 15 E.164 (+ prefix required)
Sender account Account 16
Recipient account(s) RecipientAccount 339 1–20 accounts, comma-separated

Payment detail

Field Class Max length Format
Purpose PaymentPurpose 110
Reference Detail\PaymentReference 30
Amount Amount 15 Integer pennies (pfeninzi), zero-padded

Public revenue fields

Field Class Length Format
Sender tax ID SenderTaxId 13 Exactly 13 digits (JIB/JMBG)
Payment type PaymentType 1 Single digit (0–9)
Revenue type RevenueType 6 Exactly 6 digits
Tax period date TaxPeriodDate 8 DDMMYYYY
Municipal code MunicipalCode 3 Exactly 3 digits
Budget org code BudgetOrgCode 7 Exactly 7 digits
Payment reference PublicRevenue\PaymentReference 10 Exactly 10 digits

Allowed character set

All text fields accept: alphanumeric characters, Serbian/Croatian/Bosnian diacritics (č ć đ š ž and their uppercase forms), and the symbols , : . ? ( ) + ' / - and space.

Fields with stricter formats (tax IDs, codes, phone numbers) enforce their own format in addition to the above.

Amount handling

Amount stores the value as an integer number of pennies (pfeniga) and zero-pads it to 15 digits in the payload. Use the factory helpers for other input types:

Payment priority

Exception handling

All validation runs at construction time. Exception types extend BihuppQRCodeException.:

Exception Thrown when
InvalidLengthException Value exceeds the field's maximum character length
InvalidCharacterException Value contains characters outside the allowed set
InvalidValueException Value violates a field-specific format rule (digits-only, + prefix, etc.)
MissingImageExtension A GD or Imagick render strategy is used but the required PHP extension is not loaded
UnknownScanException Reader::read() could not decode the image and the underlying library returned no specific error

Catch a specific type, or use BihuppQRCodeException to handle any library exception in one clause:

Contribute

Run code quality check before raising PRs.

License

MIT — see LICENSE.


All versions of php-bihupp-qrcode with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
chillerlan/php-qrcode Version ^6.0.0
khanamiryan/qrcode-detector-decoder Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sasa-b/php-bihupp-qrcode contains the following files

Loading the files please wait ...