PHP code example of lucas-pace / qrcode-pix

1. Go to this page and download the library: Download lucas-pace/qrcode-pix 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/ */

    

lucas-pace / qrcode-pix example snippets


    $pix = new Pix();
    $pix->setChave('[email protected]');
    $pix->setNome('Lucas Pace');
    $pix->setCidade('Juiz de Fora');


    // Salvar o arquivo
    file_put_contents('qrcode.svg', file_get_contents($pix->render()));

    // Exibi-lo
    echo '<img src="' . $pix->render() . '" alt="QR Code" style="height: 200px"/>';

setValor(10.00)