-
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38a4585
commit 41507e1
Showing
3 changed files
with
118 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
require 'autoload.php'; | ||
$beneficiario = new Eduardokum\LaravelBoleto\Pessoa([ | ||
'nome' => 'ACME', | ||
'endereco' => 'Rua um, 123', | ||
'bairro' => 'Bairro', | ||
'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\Daycoval([ | ||
'logo' => realpath(__DIR__ . '/../logos/') . DIRECTORY_SEPARATOR . '707.png', | ||
'dataVencimento' => new Carbon\Carbon(), | ||
'valor' => 100, | ||
'multa' => false, | ||
'juros' => false, | ||
'numero' => '0004309540', | ||
'numeroDocumento' => 1, | ||
'descricaoDemonstrativo' => ['demonstrativo 1', 'demonstrativo 2', 'demonstrativo 3'], | ||
'instrucoes' => ['instrucao 1', 'instrucao 2', 'instrucao 3'], | ||
'aceite' => 'S', | ||
'especieDoc' => 'DM', | ||
'pagador' => $pagador, | ||
'beneficiario' => $beneficiario, | ||
'carteira' => 3, | ||
'operacao' => 1234567, | ||
'agencia' => '0001', | ||
'conta' => '7654321', | ||
'notas_fiscais' => [ | ||
Eduardokum\LaravelBoleto\NotaFiscal::create('12345678901234567890123456789012345678901235', 2, new Carbon\Carbon(), 100), | ||
], | ||
]); | ||
|
||
$remessa = new Eduardokum\LaravelBoleto\Cnab\Remessa\Cnab400\Banco\Daycoval([ | ||
'agencia' => 1111, | ||
'carteira' => '3', | ||
'contaDv' => 9, | ||
'codigoCliente' => '190600851565400', | ||
'beneficiario' => $beneficiario, | ||
]); | ||
$remessa->addBoleto($boleto); | ||
|
||
//echo $remessa->save(__DIR__ . DIRECTORY_SEPARATOR . 'arquivos' . DIRECTORY_SEPARATOR . 'daycoval.txt'); | ||
echo '<pre>'; | ||
echo $remessa->gerar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?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\Abc([ | ||
'logo' => realpath(__DIR__ . '/../logos/') . DIRECTORY_SEPARATOR . '246.png', | ||
'dataVencimento' => new Carbon\Carbon(), | ||
'valor' => 100, | ||
'multa' => false, | ||
'juros' => false, | ||
'numero' => '0004309540', | ||
'numeroDocumento' => 1, | ||
'descricaoDemonstrativo' => ['demonstrativo 1', 'demonstrativo 2', 'demonstrativo 3'], | ||
'instrucoes' => ['instrucao 1', 'instrucao 2', 'instrucao 3'], | ||
'aceite' => 'S', | ||
'especieDoc' => 'DM', | ||
'pagador' => $pagador, | ||
'beneficiario' => $beneficiario, | ||
'carteira' => 6, | ||
'operacao' => 1234567, | ||
'agencia' => '0001', | ||
'conta' => '7654321', | ||
'notas_fiscais' => [ | ||
['chave' => '12345678901234567890123456789012345678901234', 'numero' => 1, 'data' => new Carbon\Carbon(), 'valor' => 100], | ||
Eduardokum\LaravelBoleto\NotaFiscal::create('12345678901234567890123456789012345678901235', 2, new Carbon\Carbon(), 100), | ||
new Eduardokum\LaravelBoleto\NotaFiscal(['chave' => '12345678901234567890123456789012345678901236', 'numero' => 3, 'data' => new Carbon\Carbon(), 'valor' => 100]), | ||
], | ||
]); | ||
|
||
$remessa = new Eduardokum\LaravelBoleto\Cnab\Remessa\Cnab400\Banco\Abc([ | ||
'agencia' => '0001', | ||
'conta' => '7654321', | ||
'carteira' => 6, | ||
'codigoCliente' => '00011234567', | ||
'beneficiario' => $beneficiario, | ||
]); | ||
$remessa->addBoleto($boleto); | ||
|
||
echo '<pre>'; | ||
echo $remessa->gerar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters