Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adiciona o qrcode do pix aos boletos #675

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

gustavohmelo
Copy link
Contributor

Alguns bancos já fornecem via API, quando gerado o boleto, o código PIX para pagamento, esta funcionalidade permite adicionar a imagem do QrCode do Pix em base 64 no corpo do boleto.

Como usar

$boleto = new Eduardokum\LaravelBoleto\Boleto\Banco\Bb(
    [
        'logo'                   => realpath(__DIR__ . '/../logos/') . DIRECTORY_SEPARATOR . '001.png',
        'dataVencimento'         => new \Carbon\Carbon(),
        'valor'                  => 100,
        'multa'                  => false,
        'juros'                  => false,
        'numero'                 => 1,
        'numeroDocumento'        => 1,
        'descricaoDemonstrativo' => ['demonstrativo 1', 'demonstrativo 2', 'demonstrativo 3'],
        'instrucoes'             => ['Sr. Caixa, não aceitar após o vencimento ou com cheque.', 'instrucao 2', 'instrucao 3'],
        'aceite'                 => 'S',
        'especieDoc'             => 'DM',
        'pagador'                => $pagador,
        'beneficiario'           => $beneficiario,
        'carteira'               => 11,
        'convenio'               => 1234567,
        'pix_qrcode'             => "base64_qrcode_pix",
    ]
);

Exemplo do Boleto em PDF do Banco do Brasil
bb.pdf

Exemplo do Boleto em HTML do Banco do Brasil
image

@eduardokum eduardokum merged commit e56a4c6 into eduardokum:develop Oct 10, 2022
@eduardokum
Copy link
Owner

obrigado, merged

@eduardokum eduardokum mentioned this pull request May 25, 2023
@SuportecTL SuportecTL mentioned this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants