Skip to content

Commit

Permalink
Atualização no link do boleto gerado, agora o link encaminha para um …
Browse files Browse the repository at this point in the history
…PDF.
  • Loading branch information
thiagogresende committed Jan 9, 2019
1 parent edd567d commit 6ea3d06
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v3.1.1

* Fix: Atualização no link do boleto gerado, agora o link encaminha para um PDF.

# v3.1.0

* Delete: Bandeiras jcb, aura e discover do checkout da Gerencianet.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Módulo de Integração Gerencianet para OpenCart-3.x - Versão 3.1.0 (BETA) #
# Módulo de Integração Gerencianet para OpenCart-3.x - Versão 3.1.1 (BETA) #

:warning: **Este módulo é compatível apenas com as versões do OpenCart superior a 3.0.2.0. Caso você tenha uma versão inferior do Opencart, verifique a versão correta do módulo a ser baixado na sessão [Versões](#versões)**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public function index() {
$this->load->language('extension/payment/gerencianet');
$this->document->setTitle('Gerencianet');
$this->load->model('setting/setting');
$gerencianetModuleVersion = "v3.1.0";
$gerencianetModuleVersion = "v3.1.1";

if (($this->request->server['REQUEST_METHOD'] == 'POST')) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1225,8 +1225,8 @@ public function pay_billet() {
$this->db->query("UPDATE `" . DB_PREFIX . "order` SET payment_method = 'Boleto - Gerencianet' WHERE order_id = '" . (int)$this->session->data['order_id'] . "'");
}

$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('payment_gerencianet_waiting_status_id'), '<a href="' . $charge['data']['link'] . '" target="_blank">' . $this->language->get('gn_billet_oc_order_comment') . '</a>', true);
$this->session->data['billet_link_'.$this->session->data['order_id']] = $charge['data']['link'];
$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('payment_gerencianet_waiting_status_id'), '<a href="' . $charge['data']['pdf']['charge'] . '" target="_blank">' . $this->language->get('gn_billet_oc_order_comment') . '</a>', true);
$this->session->data['billet_link_'.$this->session->data['order_id']] = $charge['data']['pdf']['charge'];
$this->session->data['order_id'] = '';
$this->cart->clear();
$this->result_api($charge, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function send($method, $route, $body)

try {
return $this->request->send($method, $route, ['json' => $body,
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'opencart-3.1.0', 'partner-token' => $partner_token]]);
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'opencart-3.1.1', 'partner-token' => $partner_token]]);
} catch (AuthorizationException $e) {
$this->auth->authorize();

return $this->request->send($method, $route, ['json' => $body,
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'opencart-3.1.0', 'partner-token' => $partner_token]]);
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'opencart-3.1.1', 'partner-token' => $partner_token]]);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(array $options = null)
'base_url' => $this->config['baseUri'],
'headers' => [
'Content-Type' => 'application/json',
'api-sdk' => 'opencart-3.1.0',
'api-sdk' => 'opencart-3.1.1',
'partner-token' => $partner_token
],
]);
Expand Down

0 comments on commit 6ea3d06

Please sign in to comment.