1. Go to this page and download the library: Download igorlula/openboleto 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/ */
igorlula / openboleto example snippets
use OpenBoleto\Banco\BancoDoBrasil;
use OpenBoleto\Agente;
$sacado = new Agente('Fernando Maia', '023.434.234-34', 'ABC 302 Bloco N', '72000-000', 'Brasília', 'DF');
$cedente = new Agente('Empresa de cosméticos LTDA', '02.123.123/0001-11', 'CLS 403 Lj 23', '71000-000', 'Brasília', 'DF');
$boleto = new BancoDoBrasil(array(
// Parâmetros obrigatórios
'dataVencimento' => new DateTime('2013-01-24'),
'valor' => 23.00,
'sequencial' => 1234567, // Para gerar o nosso número
'sacado' => $sacado,
'cedente' => $cedente,
'agencia' => 1724, // Até 4 dígitos
'carteira' => 18,
'conta' => 10403005, // Até 8 dígitos
'convenio' => 1234, // 4, 6 ou 7 dígitos
));
echo $boleto->getOutput();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.