diff --git a/CHANGELOG.md b/CHANGELOG.md index 4596cde..d4d52e2 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index 1be2ec4..155529a 100755 --- a/README.md +++ b/README.md @@ -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. diff --git a/manual/upload/admin/controller/payment/gerencianet.php b/manual/upload/admin/controller/payment/gerencianet.php index 00fae5d..04cd073 100755 --- a/manual/upload/admin/controller/payment/gerencianet.php +++ b/manual/upload/admin/controller/payment/gerencianet.php @@ -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')) { diff --git a/manual/upload/catalog/controller/payment/gerencianet.php b/manual/upload/catalog/controller/payment/gerencianet.php index 83da13e..c16b1ed 100755 --- a/manual/upload/catalog/controller/payment/gerencianet.php +++ b/manual/upload/catalog/controller/payment/gerencianet.php @@ -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'), '' . $this->language->get('gn_billet_oc_order_comment') . '', 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'), '' . $this->language->get('gn_billet_oc_order_comment') . '', 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); diff --git a/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/ApiRequest.php b/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/ApiRequest.php index 7235481..1ab3c3c 100755 --- a/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/ApiRequest.php +++ b/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/ApiRequest.php @@ -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]]); } } diff --git a/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/Request.php b/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/Request.php index 1e9518b..e08beab 100755 --- a/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/Request.php +++ b/manual/upload/lib/gerencianet/gerencianet/gerencianet-sdk-php/src/Gerencianet/Request.php @@ -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 ], ]);