1. Go to this page and download the library: Download bonami/qr-platba library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bonami / qr-platba example snippets
iskith\QRInvoice\QRInvoice;
$qrInvoice = (new QRInvoice)
->setAccount('12-3456789012/0100')
->setVariableSymbol('2016001234')
->setMessage('Toto je první QR platba.')
->setSpecificSymbol('0308')
->setSpecificSymbol('1234')
->setCurrency('CZK') // Výchozí je CZK, lze zadat jakýkoli ISO kód měny
->setDueDate(new \DateTime());
echo $qrInvoice->getQRCodeImage(); // Zobrazí <img> tag s kódem, viz níže
echo QRInvoice::create('12-3456789012/0100', 987.60)
->setMessage('QR platba je parádní!')
->getQRCodeImage();
iskith\QRInvoice\QRInvoice;
$qrInvoice = (new QRInvoice)
->setIsOnlyInvoice(true)
->setIban('CZ9701000000007098760287+KOMBCZPP')
->setAmount(61189.00)
->setVariableSymbol('3310001054')
->setInvoiceId('2001401154')
->setInvoiceDocumentType(9)
->setDueDate(new \DateTime('2018-04-12'))
->setInvoiceDate(new \DateTime('2014-04-04'))
->setTaxDate(new \DateTime('2014-04-04'))
->setTaxPerformance(0)
->setCompanyTaxId('CZ25568736')
->setCompanyRegistrationId('25568736')
->setInvoiceSubjectTaxId('CZ25568736')
->setInvoiceSubjectRegistrationId('25568736')
->setMessage('Dodávka vybavení interiéru hotelu Kamzík')
->setTaxBase(26492.70, 0)
->setTaxAmount(5563.47, 0)
->setTaxBase(25333.10, 1)
->setTaxAmount(3799.97, 1)
->setNoTaxAmount(-0.24)
->setInvoiceIncludingDeposit(false);
echo $qrInvoice->getQRCodeImage(); // Zobrazí <img> tag s kódem, viz níže
// Uloží png o velikosti 100x100 px
$qrInvoice->saveQRCodeImage('qrcode.png', 'png', 100);
// Uloží svg o velikosti 100x100 px s 10 px marginem
$qrInvoice->saveQRCodeImage('qrcode.svg', 'svg', 100, 10);