PHP code example of smhg / sepa-qr-data

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

    

smhg / sepa-qr-data example snippets


use SepaQr\Data;

$paymentData = Data::create()
  ->setName('Name of the beneficiary')
  ->setIban('BE123456789123456789')
  ->setAmount(100); // The amount in Euro

use Endroid\QrCode\Builder\Builder;
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelMedium;

Builder::create()
    ->data($paymentData)
    ->errorCorrectionLevel(new ErrorCorrectionLevelMedium()) // 

use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;

$qrOptions = new QROptions([
    'eccLevel' => QRCode::ECC_M // g');

$paymentData = Data::create();
// ->set...

Builder::create()
    ->errorCorrectionLevel(new ErrorCorrectionLevelMedium())
    ->data($paymentData)
    ->build()
    ->saveToFile('payment.png');
bash
composer