protected function configuraEnvio()
{
$this->adicionaPortador();
$this->adicionaTransacao();
$this->adicionaFormaPagamento();
$this->getEnvio()->addChild('url-retorno', $this->urlRetorno);
$this->getEnvio()->addChild('autorizar', $this->transacao->getAutorizar());
$this->getEnvio()->addChild('capturar', $this->transacao->getCapturar());
$this->getEnvio()->addChild('campo-livre', '');
if (Autorizacao::MODALIDADE_BUY_PAGE_LOJA !== $this->getModalidadeIntegracao()) {
return;
}
$numeroCartao = $this->cartao->getCartao();
if (!empty($numeroCartao)) {
$this->getEnvio()->addChild('bin', substr($this->cartao->getCartao(), 0, 6));
if ($this->transacao->isGerarToken() === true) {
$this->getEnvio()->addChild('gerar-token', 'true');
}
}
}