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 1ee7d10 commit 72f4986
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 @@
# v0.4.1

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

# v0.4.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 - Versão 0.4.0 #
# Módulo de Integração Gerencianet para OpenCart - Versão 0.4.1 #

Este módulo é compatível com as versões do OpenCart 2.0.0.0, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2 e 2.2.0.0.

Expand Down
2 changes: 1 addition & 1 deletion manual/upload/admin/controller/payment/gerencianet.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public function index() {
$this->load->language('payment/gerencianet');
$this->document->setTitle('Gerencianet');
$this->load->model('setting/setting');
$gerencianetModuleVersion = "v0.4.0";
$gerencianetModuleVersion = "v0.4.1";

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

Expand Down
4 changes: 2 additions & 2 deletions manual/upload/catalog/controller/payment/gerencianet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,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('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('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-0.4.0', 'partner-token' => $partner_token]]);
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'opencart-0.4.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-0.4.0', 'partner-token' => $partner_token]]);
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'opencart-0.4.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-0.4.0',
'api-sdk' => 'opencart-0.4.1',
'partner-token' => $partner_token
],
]);
Expand Down

0 comments on commit 72f4986

Please sign in to comment.