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\QrCode;
use PetrKnap\SpaydQr\Spayd;
echo '<img src="' . QrCode::asDataUri(
Spayd::create(
account: 'CZ7801000000000000000123',
amount: Money::CZK(79950),
),
) . '">';
use Money\Money;
use PetrKnap\SpaydQr\Spayd;
Spayd::create(
account: 'CZ7801000000000000000123',
amount: Money::CZK(79950),
)->withVariableSymbol(20250323001);
use Money\Money;
use PetrKnap\SpaydQr\Spayd;
Spayd::create(
account: 'CZ7801000000000000000123',
invoice: Spayd\Sind::create(
id: 'FA20250323001',
issueDate: new DateTime('2025-03-23'),
amount: Money::CZK(79950),
),
)->withVariableSymbol(20250323001);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.