Creates QR code for bank in Czechia, Slovakia, Poland and banks using EPC QR code
Use Composer to install the library. Also make sure you have enabled and configured the GD extension if you want to generate images. For Slovakia QR codes xz library is required.
composer require ontob/qrpaymentuse Ontob\QrPayment\QrPaymentCZE;
$qrCode = QrPaymentCZE::create('CZ2920100000002500278163')
->setAmount(300)
->setCurrency('CZK')
->setVariableSymbol('123589123');use Ontob\QrPayment\QrPaymentSVK;
$qrCode = QrPaymentSVK::create('CZ2920100000002500278163')
->setAmount(300)
->setCurrency('CZK')
->setVariableSymbol('123589123');
// ->setXZbinaryPath() - optional setting XZ library path if not defaultuse Ontob\QrPayment\QrPaymentPOL;
$qrCode = QrPaymentPOL::create('CZ2920100000002500278163')
->setAmount(300)
->setVariableSymbol('123589123');
// Currency is not used, it is always PLuse Ontob\QrPayment\QrPaymentEPC;
$qrCode = QrPaymentEPC::create('CZ2920100000002500278163')
->setAmount(300)
->setCurrency('CZK')
->setVariableSymbol('123589123');Check each classes for additional fields.
// returns Endroid\QrCode\Writer\Result\PngResult
$image = $qrCode->qrImage();
// Get Base64 string
$image->getDataUri();
// Save image to file
$image->saveToFile('qrimage.png');Open-sourced software licensed under the MIT license.