PHP code example of mjaschen / bezahlcode

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

    

mjaschen / bezahlcode example snippets

 php


use MarcusJaschen\BezahlCode\Type\SepaTransfer;

$bezahlCode = new SepaTransfer();

$bezahlCode->setTransferData(
    "Marcus Jaschen",
    "DE12345678901234567890",
    "SPARDEFFXXX",
    99.99,
    "Test SEPA Transfer"
);

header('Content-type: image/png');
echo $bezahlCode->getBezahlCode('png');
 php


use MarcusJaschen\BezahlCode\Type\SepaTransfer;

$bezahlCode = new SepaTransfer();

$bezahlCode->setTransferData(
    "Marcus Jaschen",
    "DE12345678901234567890",
    "SPARDEFFXXX",
    99.99,
    "Test SEPA Transfer"
);

$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "bezahlcode_test.svg";

$bezahlCode->saveBezahlCode($file, 'svg');
 php


use MarcusJaschen\BezahlCode\Type\SepaTransfer;

$bezahlCode = new SepaTransfer();

$bezahlCode->setTransferData(
    "Marcus Jaschen",
    "DE12345678901234567890",
    "SPARDEFFXXX",
    99.99,
    "Test SEPA Transfer"
);

echo $bezahlCode->getBezahlCodeURI();
 php


use MarcusJaschen\BezahlCode\Type\Transfer;

$bezahlCode = new Transfer();

$bezahlCode->setTransferData(
    "Marcus Jaschen",
    "1234567890",
    "10050000",
    99.99,
    "Test Classic Transfer"
);

header('Content-type: image/png');
echo $bezahlCode->getBezahlCode();