PHP code example of oneb-pub / qr-uct

1. Go to this page and download the library: Download oneb-pub/qr-uct 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/ */

    

oneb-pub / qr-uct example snippets


$generator = new UCT\Generator();

$generator
    ->setAmount(101) //Сумма у копійках (тільки ціле число)
    ->setCurrency('UAH') //Валюта
    ->setPaymentPurpose('Благодійний безповоротний внесок') //Призначення платежу
    ->setReceiverAccount('UA473052990000026005026707459') //Рахунок IBAN
    ->setReceiverCode('43720363') // РНОКПП або ЄДРПОУ
    ->setReceiverName('БО "Фонд Сергія Притули"'); // ПІБ або на назва юридичної особи отримувача

//URL
$url = $generator->generateUrl();

//QR-code
$qrCodeSvg = $generator->generateQrCodeSvg();

echo $qrCodeSvg;
echo "<a href=\"$url\">Переказати кошти</a>";