Skip to content

Commit 9241df7

Browse files
author
Ariano Fonseca Ângelo
committed
v3.2.2
- Minor fixes
1 parent 8ef385e commit 9241df7

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,11 @@ The easiest and fastest way is via our live chat on our [website](https://crypta
155155
* New settings layout
156156
* Minor fixes
157157

158+
#### 3.2.1
159+
* Minor fixes
160+
161+
#### 3.2.2
162+
* Minor fixes
163+
158164
== Upgrade Notice ==
159165
* No breaking changes

catalog/controller/extension/payment/cryptapi.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ public function isCryptapiOrder($status = false)
172172

173173
public function pay()
174174
{
175+
$this->document->addScript('catalog/view/javascript/cryptapi/js/cryptapi_script.js');
176+
$this->document->addStyle('catalog/view/javascript/cryptapi/css/cryptapi_style.css');
177+
175178
// In case the extension is disabled, do nothing
176179
if (!$this->config->get('payment_cryptapi_status')) {
177180
$this->response->redirect($this->url->link('common/home', '', true));
@@ -549,7 +552,12 @@ function order_pay_button(&$route, &$data, &$output)
549552

550553
$orderFetch = $this->model_checkout_order->getOrder($order_id);
551554
$order = $this->model_extension_payment_cryptapi->getOrder($order_id);
552-
$orderObj = json_decode($order['response']);
555+
556+
$orderObj = isset($order['response']) ? json_decode($order['response']) : '';
557+
558+
if(!$orderObj) {
559+
return;
560+
}
553561

554562
if ((int)$orderObj->cryptapi_cancelled === 0 && isset($orderObj->cryptapi_payment_url) && (int)$orderFetch['order_status_id'] === 1) {
555563
$data['button_continue'] = 'Pay Order';

catalog/view/theme/default/template/extension/payment/cryptapi_success.twig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{{ header }}
2-
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/cryptapi/css/cryptapi_style.css">
3-
<script type="text/javascript" src="catalog/view/javascript/cryptapi/js/cryptapi_script.js"></script>
42
<script>
53
let ajax_url = '{{ ajax_url }}';
64
check_status(ajax_url);
@@ -163,7 +161,6 @@
163161
</tr>
164162
</table>
165163
</div>
166-
167164
<div class="ca_progress">
168165
<div class="ca_progress_icon waiting_payment done">
169166
<svg width="60" height="60" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">

0 commit comments

Comments
 (0)