From 60cb882d6d9eebda1e9483da7071881da3c2b891 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Fri, 20 Sep 2024 14:23:21 +0300 Subject: [PATCH 1/7] [SL-234] fix not rendering --- views/templates/front/credit_cards.tpl | 2 +- views/templates/front/credit_cards_16.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/templates/front/credit_cards.tpl b/views/templates/front/credit_cards.tpl index d042b193..9c69534f 100755 --- a/views/templates/front/credit_cards.tpl +++ b/views/templates/front/credit_cards.tpl @@ -51,7 +51,7 @@ {foreach $rows as $row} - {$row nofilter|escape:'htmlall':'UTF-8'} + {$row|escape:'htmlall':'UTF-8' nofilter} {/foreach} diff --git a/views/templates/front/credit_cards_16.tpl b/views/templates/front/credit_cards_16.tpl index ee8f2a0a..292aa37e 100755 --- a/views/templates/front/credit_cards_16.tpl +++ b/views/templates/front/credit_cards_16.tpl @@ -53,7 +53,7 @@ {foreach $rows as $row} - {$row nofilter|escape:'htmlall':'UTF-8'} + {$row|escape:'htmlall':'UTF-8' nofilter} {/foreach} From b7f101dc428069907e6a62ae6df57d59022358a2 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Fri, 20 Sep 2024 14:28:06 +0300 Subject: [PATCH 2/7] [SL-234] fix --- saferpayofficial.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/saferpayofficial.php b/saferpayofficial.php index a4a4e230..8512afaf 100755 --- a/saferpayofficial.php +++ b/saferpayofficial.php @@ -366,12 +366,12 @@ public function hookDisplayCustomerAccount() } if (\Invertus\SaferPay\Config\SaferPayConfig::isVersion17()) { return $this->context->smarty->fetch( - $this->getLocalPath() . 'views/templates/hook/front/MyAccount.tpl' + 'module:saferpayofficial/views/templates/hook/front/MyAccount.tpl' ); } return $this->context->smarty->fetch( - $this->getLocalPath() . 'views/templates/hook/front/MyAccount_16.tpl' + 'module:saferpayofficial/views/templates/hook/front/MyAccount_16.tpl' ); } From acd2f60f53f577e9704f3d5aae3d061d56dd6721 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Fri, 20 Sep 2024 15:26:25 +0300 Subject: [PATCH 3/7] [SL-234] fix --- src/Service/SaferPayOrderStatusService.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Service/SaferPayOrderStatusService.php b/src/Service/SaferPayOrderStatusService.php index 711b837c..390325c2 100755 --- a/src/Service/SaferPayOrderStatusService.php +++ b/src/Service/SaferPayOrderStatusService.php @@ -189,14 +189,21 @@ public function cancel(Order $order) $saferPayOrder = new SaferPayOrder($saferPayOrderId); $cancelRequest = $this->cancelRequestObjectCreator->create($saferPayOrder->transaction_id); try { - $this->cancelService->cancel($cancelRequest); + $cancelResponse = $this->cancelService->cancel($cancelRequest); } catch (Exception $e) { throw new SaferPayApiException('Cancel API failed', SaferPayApiException::CANCEL); } $order->setCurrentState(_SAFERPAY_PAYMENT_CANCELED_); $order->update(); $saferPayOrder->canceled = 1; + $saferPayOrder->update(); + + $assertId = $this->orderRepository->getAssertIdBySaferPayOrderId($saferPayOrder->id); + $saferPayAssert = new SaferPayAssert($assertId); + $saferPayAssert->status = 'CANCELED'; + + $saferPayAssert->update(); } public function refund(Order $order, $refundedAmount) From f3f85c2e1f4cbc67dbd4a6e68d9d7c6acf8f994e Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Fri, 20 Sep 2024 16:01:00 +0300 Subject: [PATCH 4/7] [SL-234] fix --- src/Service/SaferPayOrderStatusService.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Service/SaferPayOrderStatusService.php b/src/Service/SaferPayOrderStatusService.php index 390325c2..711b837c 100755 --- a/src/Service/SaferPayOrderStatusService.php +++ b/src/Service/SaferPayOrderStatusService.php @@ -189,21 +189,14 @@ public function cancel(Order $order) $saferPayOrder = new SaferPayOrder($saferPayOrderId); $cancelRequest = $this->cancelRequestObjectCreator->create($saferPayOrder->transaction_id); try { - $cancelResponse = $this->cancelService->cancel($cancelRequest); + $this->cancelService->cancel($cancelRequest); } catch (Exception $e) { throw new SaferPayApiException('Cancel API failed', SaferPayApiException::CANCEL); } $order->setCurrentState(_SAFERPAY_PAYMENT_CANCELED_); $order->update(); $saferPayOrder->canceled = 1; - $saferPayOrder->update(); - - $assertId = $this->orderRepository->getAssertIdBySaferPayOrderId($saferPayOrder->id); - $saferPayAssert = new SaferPayAssert($assertId); - $saferPayAssert->status = 'CANCELED'; - - $saferPayAssert->update(); } public function refund(Order $order, $refundedAmount) From ad707d6f77cef5ff8f02af7ecf4c2963e8db4c44 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 23 Sep 2024 12:58:19 +0300 Subject: [PATCH 5/7] [SL-234] fix --- saferpayofficial.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/saferpayofficial.php b/saferpayofficial.php index 8512afaf..c7bc468b 100755 --- a/saferpayofficial.php +++ b/saferpayofficial.php @@ -371,7 +371,7 @@ public function hookDisplayCustomerAccount() } return $this->context->smarty->fetch( - 'module:saferpayofficial/views/templates/hook/front/MyAccount_16.tpl' + _PS_THEME_DIR_ . 'modules/saferpayofficial/views/templates/hook/front/MyAccount.tpl' ); } From e478360e75c2b81a81ba43accb762a3f8b8a72ab Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 23 Sep 2024 13:10:07 +0300 Subject: [PATCH 6/7] [SL-234] fix --- saferpayofficial.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/saferpayofficial.php b/saferpayofficial.php index c7bc468b..bd36b49e 100755 --- a/saferpayofficial.php +++ b/saferpayofficial.php @@ -370,9 +370,7 @@ public function hookDisplayCustomerAccount() ); } - return $this->context->smarty->fetch( - _PS_THEME_DIR_ . 'modules/saferpayofficial/views/templates/hook/front/MyAccount.tpl' - ); + return $this->display(__FILE__, 'front/MyAccount_16.tpl'); } public function displayNavigationTop() From 3794fbe0ee24bc7e0af1257a9636a98df2c3b194 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Tue, 1 Oct 2024 16:14:08 +0300 Subject: [PATCH 7/7] [SL-234] fix --- saferpayofficial.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/saferpayofficial.php b/saferpayofficial.php index bd36b49e..d3bb6a69 100755 --- a/saferpayofficial.php +++ b/saferpayofficial.php @@ -365,9 +365,7 @@ public function hookDisplayCustomerAccount() return; } if (\Invertus\SaferPay\Config\SaferPayConfig::isVersion17()) { - return $this->context->smarty->fetch( - 'module:saferpayofficial/views/templates/hook/front/MyAccount.tpl' - ); + return $this->display(__FILE__, 'front/MyAccount.tpl'); } return $this->display(__FILE__, 'front/MyAccount_16.tpl');