PHP code example of petrknap / spayd-qr

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

    

petrknap / spayd-qr example snippets


use Money\Money;
use PetrKnap\SpaydQr\SpaydQr;

$iban = 'CZ7801000000000000000123';
$amount = 799.50;

echo '<img src="' .
    SpaydQr::create(
        $iban,
        Money::CZK((int)($amount * 100))
    )->getDataUri()
. '">';