This code generates Mobilepay QR codes for KBHFF using the endroid/qr-code library.
Dependencies are handled by composer; run composer install --no-dev to install them.
Example code is as follows:
<?php
require_once __DIR__ . "/../vendor/autoload.php";
use \FjolleJagt\kbhffQRCode\QRCodeGenerator;
$filename = QRCodeGenerator::generate(30.50, "Østerbro", "3142");
?>
<img src="<?php echo $filename; ?>" alt="QR code"/>You can run the tests by running the command ./vendor/bin/phpunit. (This requires installing the dev dependencies with composer install --dev.)