Skip to content

Commit

Permalink
boleto senha
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardokum committed Jan 31, 2024
1 parent 9d3e2b5 commit 4759488
Show file tree
Hide file tree
Showing 2 changed files with 294 additions and 113 deletions.
46 changes: 46 additions & 0 deletions exemplos/boleto_protection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

require 'autoload.php';
$beneficiario = new Eduardokum\LaravelBoleto\Pessoa([
'nome' => 'ACME',
'endereco' => 'Rua um, 123',
'cep' => '99999-999',
'uf' => 'UF',
'cidade' => 'CIDADE',
'documento' => '99.999.999/9999-99',
]);

$pagador = new Eduardokum\LaravelBoleto\Pessoa([
'nome' => 'Cliente',
'endereco' => 'Rua um, 123',
'bairro' => 'Bairro',
'cep' => '99999-999',
'uf' => 'UF',
'cidade' => 'CIDADE',
'documento' => '999.999.999-99',
]);

$boleto = new Eduardokum\LaravelBoleto\Boleto\Banco\Bancoob([
'logo' => realpath(__DIR__ . '/../logos/') . DIRECTORY_SEPARATOR . '756.png',
'dataVencimento' => new Carbon\Carbon(),
'valor' => 100,
'multa' => false,
'juros' => false,
'numero' => 1,
'numeroDocumento' => 1,
'pagador' => $pagador,
'beneficiario' => $beneficiario,
'carteira' => 1,
'agencia' => 1111,
'convenio' => 123123,
'conta' => 22222,
'descricaoDemonstrativo' => ['demonstrativo 1', 'demonstrativo 2', 'demonstrativo 3'],
'instrucoes' => ['instrucao 1', 'instrucao 2', 'instrucao 3'],
'aceite' => 'S',
'especieDoc' => 'DM',
]);

$pdf = new Eduardokum\LaravelBoleto\Boleto\Render\Pdf();
$pdf->addBoleto($boleto);
$pdf->SetProtection('123123');
$pdf->gerarBoleto($pdf::OUTPUT_SAVE, __DIR__ . DIRECTORY_SEPARATOR . 'arquivos' . DIRECTORY_SEPARATOR . 'bancoob.pdf');
Loading

0 comments on commit 4759488

Please sign in to comment.