From 23f154a167b7a041c728e10ff6015c5f4a2b54e1 Mon Sep 17 00:00:00 2001 From: rlzdesenv <86244364+rlzdesenv@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:01:17 -0300 Subject: [PATCH] Add files via upload --- src/Bank/BrasilArrecadacaoService.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Bank/BrasilArrecadacaoService.php b/src/Bank/BrasilArrecadacaoService.php index 1755f83..0280a75 100644 --- a/src/Bank/BrasilArrecadacaoService.php +++ b/src/Bank/BrasilArrecadacaoService.php @@ -108,14 +108,6 @@ private function setVariables() { $this->base_gw_key = 'd27bd77908ffab901368e17de0050656b9d1a5bf'; $this->setClientId('eyJpZCI6Ijk1OGQwZjQtOSIsImNvZGlnb1B1YmxpY2Fkb3IiOjAsImNvZGlnb1NvZnR3YXJlIjoxNTkzNSwic2VxdWVuY2lhbEluc3RhbGFjYW8iOjF9'); $this->setClientSecret('eyJpZCI6IiIsImNvZGlnb1B1YmxpY2Fkb3IiOjAsImNvZGlnb1NvZnR3YXJlIjoxNTkzNSwic2VxdWVuY2lhbEluc3RhbGFjYW8iOjEsInNlcXVlbmNpYWxDcmVkZW5jaWFsIjoxLCJhbWJpZW50ZSI6ImhvbW9sb2dhY2FvIiwiaWF0IjoxNjIxMDIwNTUxMDE1fQ'); - $this->setCodigoSolicitacaoBancoCentralBrasil('e2572aa4-52d6-4527-bc69-60c0699ea50d'); - if ($this->getCpfDevedor()) { - $this->setCpfDevedor('72335607065'); - $this->setNomeDevedor('HELIO FERREIRA PEIXOTO'); - } else { - $this->setCnpjDevedor('97167096000119'); - $this->setNomeDevedor('DOCERIA DO LAGO CACIQUE'); - }; } else { $this->base_uri = '???'; //Produção $this->base_uri_token = '???'; @@ -216,6 +208,17 @@ public function createPix() $body->quantidadeSegundoExpiracao = $expiracao ?: 600; $this->setVariables(); + if ($this->isSandbox()) { + $body->codigoSolicitacaoBancoCentralBrasil = 'e2572aa4-52d6-4527-bc69-60c0699ea50d'; + if ($this->getCpfDevedor()) { + $body->cpfDevedor = '72335607065'; + $body->nomeDevedor = 'HELIO FERREIRA PEIXOTO'; + } else { + $body->cnpjDevedor = '97167096000119'; + $body->nomeDevedor = 'DOCERIA DO LAGO CACIQUE'; + }; + } + //Requisição HTTPS $res = $this->client->request('POST', $this->base_uri.'/arrecadacao-qrcodes', [ 'headers' => ['Authorization' => 'Bearer '.$token],