1
My difficulty is in making the Parsing of data returned in the boleto generation. My goal is to take this data and make some transformations, such as formatting the date/time and some other changes like boleto status translation, etc.
My methods of generating billet and query:
/**
* Gera um boleto para pagamento
*
* @param int $valor
* @param array $dados
* @param string $urlCallBack
* @param array $metadados
* @return void
*/
public function gerar($valor, $dados, $urlCallBack = null, $metadados = null)
{
$customer = new Customer($dados);
return $this->pagarMe->transaction()->boletoTransaction(
$valor,
$customer,
$urlCallBack,
$metadados
);
}
/**
* Retorna os dados do boleto
*
* @return \PagarMe\Sdk\Transaction\BoletoTransaction
*/
public function consultar(int $transacaoId)
{
return $this->dicionario($this->pagarMe->transaction()->get($transacaoId));
}