-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
3d9a03e
commit f7bf190
Showing
22 changed files
with
1,307 additions
and
10 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
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,3 @@ | ||
02RETORNO01COBRANCA 000000000000000000000000000000077INTER 061221 000001 | ||
10 11200010100000000 0 00000000000 112020612210000000001000000000000712210000000001000077000101 00000000000000 00000000000000 000002 | ||
9201077 00000001 00001000000000000 00000 00000000000000000 000003 |
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,2 @@ | ||
* | ||
!.gitignore |
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,48 @@ | ||
<?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\Inter( | ||
[ | ||
'logo' => realpath(__DIR__ . '/../logos/') . DIRECTORY_SEPARATOR . '077.png', | ||
'dataVencimento' => (new \Carbon\Carbon())->addDays(), | ||
'valor' => 10, | ||
'multa' => false, | ||
'juros' => false, | ||
'numero' => 1, | ||
'numeroDocumento' => 1, | ||
'nossoNumero' => '00757713765', | ||
'pagador' => $pagador, | ||
'beneficiario' => $beneficiario, | ||
'conta' => '173699880', | ||
'operacao' => '0587891', | ||
'aceite' => 'S', | ||
'especieDoc' => 'DM' | ||
] | ||
); | ||
|
||
$pdf = new Eduardokum\LaravelBoleto\Boleto\Render\Pdf(); | ||
$pdf->addBoleto($boleto); | ||
$pdf->gerarBoleto($pdf::OUTPUT_SAVE, __DIR__ . DIRECTORY_SEPARATOR . 'arquivos' . DIRECTORY_SEPARATOR . 'inter.pdf'); |
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,55 @@ | ||
<?php | ||
require 'autoload.php'; | ||
|
||
$beneficiario = new \Eduardokum\LaravelBoleto\Pessoa( | ||
[ | ||
'nome' => 'INTRA-SIS DESENVOLVIMENTO DE SISTEMAS', | ||
'endereco' => 'Av. Engenheiro Caetano Alvares, 3536 - Sala 3', | ||
'cep' => '02546-000', | ||
'uf' => 'SP', | ||
'cidade' => 'São Paulo', | ||
'documento' => '10.228.511/0001-19', | ||
] | ||
); | ||
|
||
$pagador = new \Eduardokum\LaravelBoleto\Pessoa( | ||
[ | ||
'nome' => 'Eduardo Gusmão', | ||
'endereco' => 'Rua Sete de Abril, 1294 - AP 503', | ||
'bairro' => 'Juveve', | ||
'cep' => '80040-120', | ||
'uf' => 'PR', | ||
'cidade' => 'Curitiba', | ||
'documento' => '33532256843', | ||
] | ||
); | ||
|
||
$boleto = new Eduardokum\LaravelBoleto\Boleto\Banco\Inter( | ||
[ | ||
'logo' => realpath(__DIR__ . '/../logos/') . DIRECTORY_SEPARATOR . '077.png', | ||
'dataVencimento' => (new \Carbon\Carbon())->addDays(), | ||
'valor' => 10, | ||
'multa' => false, | ||
'juros' => false, | ||
'numero' => 1, | ||
'numeroDocumento' => 1, | ||
'pagador' => $pagador, | ||
'beneficiario' => $beneficiario, | ||
'conta' => '173699880', | ||
'operacao' => '0587891', | ||
'aceite' => 'S', | ||
'especieDoc' => 'DM' | ||
] | ||
); | ||
|
||
$api = new Eduardokum\LaravelBoleto\Api\Banco\Inter( | ||
'173699880', | ||
realpath(__DIR__ . '/certs/') . DIRECTORY_SEPARATOR . 'cert.crt', | ||
realpath(__DIR__ . '/certs/') . DIRECTORY_SEPARATOR . 'key.key' | ||
); | ||
|
||
$boleto = $api->createBoleto($boleto); | ||
|
||
$pdf = new Eduardokum\LaravelBoleto\Boleto\Render\Pdf(); | ||
$pdf->addBoleto($boleto); | ||
$pdf->gerarBoleto($pdf::OUTPUT_SAVE, __DIR__ . DIRECTORY_SEPARATOR . 'arquivos' . DIRECTORY_SEPARATOR . 'inter.pdf'); |
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,37 @@ | ||
<?php | ||
|
||
use Eduardokum\LaravelBoleto\Boleto\Banco\Inter; | ||
|
||
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', | ||
] | ||
); | ||
|
||
$api = new Eduardokum\LaravelBoleto\Api\Banco\Inter( | ||
'173699880', | ||
realpath(__DIR__ . '/certs/') . DIRECTORY_SEPARATOR . 'cert.crt', | ||
realpath(__DIR__ . '/certs/') . DIRECTORY_SEPARATOR . 'key.key' | ||
); | ||
|
||
$retorno = $api->retrieveList(); | ||
$boletos = []; | ||
if ($list = $retorno->body->content) { | ||
foreach ($list as $boleto) { | ||
$boletos[] = Inter::createFromAPI($boleto, [ | ||
'conta' => '173699880', | ||
'beneficiario' => $beneficiario, | ||
]); | ||
} | ||
} | ||
|
||
$pdf = new Eduardokum\LaravelBoleto\Boleto\Render\Pdf(); | ||
$pdf->addBoletos($boletos); | ||
$pdf->gerarBoleto($pdf::OUTPUT_SAVE, __DIR__ . DIRECTORY_SEPARATOR . 'arquivos' . DIRECTORY_SEPARATOR . 'inter_lista.pdf'); |
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,59 @@ | ||
<?php | ||
|
||
use Eduardokum\LaravelBoleto\Util; | ||
|
||
require 'autoload.php'; | ||
|
||
$beneficiario = new \Eduardokum\LaravelBoleto\Pessoa( | ||
[ | ||
'nome' => 'INTRA-SIS DESENVOLVIMENTO DE SISTEMAS', | ||
'endereco' => 'Av. Engenheiro Caetano Alvares, 3536 - Sala 3', | ||
'cep' => '02546-000', | ||
'uf' => 'SP', | ||
'cidade' => 'São Paulo', | ||
'documento' => '10.228.511/0001-19', | ||
] | ||
); | ||
|
||
$pagador = new \Eduardokum\LaravelBoleto\Pessoa( | ||
[ | ||
'nome' => 'Eduardo Gusmão', | ||
'endereco' => 'Rua Sete de Abril, 1294 - AP 503', | ||
'bairro' => 'Juveve', | ||
'cep' => '80040-120', | ||
'uf' => 'PR', | ||
'cidade' => 'Curitiba', | ||
'documento' => '33532256843', | ||
] | ||
); | ||
|
||
$boleto = new Eduardokum\LaravelBoleto\Boleto\Banco\Inter( | ||
[ | ||
'logo' => realpath(__DIR__ . '/../logos/') . DIRECTORY_SEPARATOR . '077.png', | ||
'dataVencimento' => (new \Carbon\Carbon())->addDays(), | ||
'valor' => 10, | ||
'multa' => false, | ||
'juros' => false, | ||
'numero' => 1, | ||
'numeroDocumento' => 1, | ||
'pagador' => $pagador, | ||
'beneficiario' => $beneficiario, | ||
'conta' => '173699880', | ||
'operacao' => '0587891', | ||
'aceite' => 'S', | ||
'especieDoc' => 'DM' | ||
] | ||
); | ||
|
||
$remessa = new \Eduardokum\LaravelBoleto\Cnab\Remessa\Cnab400\Banco\Inter( | ||
[ | ||
'idRemessa' => 1, | ||
'agencia' => '0001', | ||
'conta' => '173699880', | ||
'carteira' => 112, | ||
'beneficiario' => $beneficiario, | ||
] | ||
); | ||
$remessa->addBoleto($boleto); | ||
|
||
echo $remessa->save(__DIR__ . DIRECTORY_SEPARATOR . 'arquivos' . DIRECTORY_SEPARATOR . 'inter.txt', true); |
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,7 @@ | ||
<?php | ||
require 'autoload.php'; | ||
$retorno = \Eduardokum\LaravelBoleto\Cnab\Retorno\Factory::make(__DIR__ . DIRECTORY_SEPARATOR . 'arquivos' . DIRECTORY_SEPARATOR . 'inter.ret'); | ||
$retorno->processar(); | ||
|
||
echo $retorno->getBancoNome(); | ||
dd($retorno->getDetalhes()); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.