Download the PHP package kenlas/mnb-qr-code-payment-generator-php without Composer

On this page you can find all versions of the php package kenlas/mnb-qr-code-payment-generator-php. 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 mnb-qr-code-payment-generator-php

mnb-qr-code-payment-generator-php

PHP implementation of MNB's (Hungarian National Bank) QR code payment generation algorithm

The complete guide can be found here: https://www.mnb.hu/letoltes/qr-kod-utmutato-20190712.pdf

Uses endroid/qr-code for QR code image generation.

Requirements

PHP 7.2

Installation

Example usage

You can send the generated QR code directly to the output:

You can save it as an image:

Or you can get the QR code as base64 encoded data URI:

You can also use your own QR code renderer: (see https://github.com/endroid/qr-code for more examples)

MnbQrCodePayment\Generator available setters

Method name Required/optional Maximum length Description
setMethod($code) Required 3 Must be HCT for transfer orders or RTP for payment request
setVersion($version) Optional 3 For future use only, defaults to 001
setCharacterSet($charset) Optional 1 For compatibility reasons only, defaults to 1
setBic($bic) Required 11 The bank's BIC/SWIFT code
setName($name) Required 70 The payer/beneficiary name
setIban($iban) Required 28 The payer/beneficiary IBAN account number
setAmount($amount) Optional 12 The payment amount in HUF, integers only
setExpiration($date) Required - PHP Date object for the expiration date
setPaymentSituation($purposeCode) Optional 4 Purpose code for the given payment situation (see https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets)
setMessage($message) Optional 70 Message
setShopId($value) Optional 35 Shop ID
setDeviceId($value) Optional 35 Device ID
setInvoiceId($value) Optional 35 Invoice ID
setCustomerId($value) Optional 35 Customer ID
setTransactionId($value) Optional 35 Transaction ID
setLoyaltyId($value) Optional 35 Loyalty ID
setNavVerificationCode($value) Optional 35 NAV verification code

MnbQrCodePayment\Utils available helper methods

Method name Description
hungarianBbanToIban($bban) Convert a hungarian BBAN (16 or 24 character lengths) to IBAN format

MnbQrCodePayment\QrCodeImage available methods

Method name Description
constructor Optionally initialize with a QR code string, generated by MnbQrCodePayment\Generator
setQrString($qrString) QR code string generated by MnbQrCodePayment\Generator
setRenderer($renderer) Set a new renderer - an instance of Endroid\QrCode\QrCode. Can be useful if you want to customize QR code's settings
display() Send appropriate headers and display QR code as an image (PNG format by default)
saveTo($path) Save QR code as an image file (PNG format by default)
asDataUri() Returns the QR code as a base64 encoded data URI - useful to pass to an img src attribute

Contact

If you have any questions feel free to contact me at [email protected]


All versions of mnb-qr-code-payment-generator-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
endroid/qr-code Version ^3.9
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 kenlas/mnb-qr-code-payment-generator-php contains the following files

Loading the files please wait ....