Skip to content

Commit

Permalink
Images boleto generate
Browse files Browse the repository at this point in the history
  • Loading branch information
Matheus committed Jun 1, 2018
1 parent a58fa15 commit 2ed5a33
Show file tree
Hide file tree
Showing 30 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/registrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'return' => Retorno::OBJECT
]);

$boletosRegistrados = $itau->registrar($boletos, $dadosComplementares);
$boletosRegistrados = $itau->registrar($boleto, $dadosComplementares);

foreach($boletosRegistrados['data'] as $boletoResponse) {
if ($stream = fopen($boletoResponse['file'], 'r')) {
Expand Down
9 changes: 2 additions & 7 deletions src/ItauBoleto/Services/ServiceBoleto.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ public function registrar(array $boletos, DadosComplementaresRequest $dadosCompl
public function printHtml(array $boleto, $logoEmpresa, $cachePath)
{
try {

$currentLocation = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];

$factory = new BoletoFactory([
'cachePath' => $cachePath,
'imageUrl' => dirname($currentLocation) . '/images'
'imageUrl' => realpath(dirname(__FILE__)."/../../resources/images")
]);

$dados = [
Expand Down Expand Up @@ -132,11 +129,9 @@ public function printHtml(array $boleto, $logoEmpresa, $cachePath)
public function printPdf(array $boleto, $logoEmpresa, $cachePath)
{
try {
$currentLocation = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];

$factory = new BoletoFactory([
'cachePath' => $cachePath,
'imageUrl' => dirname($currentLocation) . '/images'
'imageUrl' => realpath(dirname(__FILE__)."/../../resources/images")
]);

$dados = [
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 2ed5a33

Please sign in to comment.