Skip to content

Commit

Permalink
itau retorno set error
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardokum committed Dec 5, 2023
1 parent 4f26539 commit b01df56
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cnab/Retorno/Cnab400/Banco/Itau.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private function processarPix(array $detalhe)
$d->setPixChaveTipo(Util::tipoChavePix($d->getPixChave()));
$d->setId(Arr::get($decoded, '62.05'));
}
$d->setError(Util::appendStrings($d->getError(), $aErrorPix[sprintf('%03s', $this->rem(392, 394, $detalhe))]));
$d->appendError($aErrorPix[sprintf('%03s', $this->rem(392, 394, $detalhe))]);

return false;
}
Expand Down
12 changes: 12 additions & 0 deletions src/Cnab/Retorno/Cnab400/Detalhe.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,18 @@ public function setError($error)
return $this;
}

/**
* @param string $error
*
* @return Detalhe
*/
public function appendError($error)
{
$this->error .= $error;

return $this;
}

/**
* @return mixed
*/
Expand Down

0 comments on commit b01df56

Please sign in to comment.