diff --git a/Bootstrap.php b/Bootstrap.php old mode 100755 new mode 100644 diff --git a/Migrations/Migration20210608221920.php b/Migrations/Migration20210608221920.php old mode 100755 new mode 100644 diff --git a/Migrations/Migration20230303113003.php b/Migrations/Migration20230303113003.php old mode 100755 new mode 100644 index 199ae87..2f89ab4 --- a/Migrations/Migration20230303113003.php +++ b/Migrations/Migration20230303113003.php @@ -35,9 +35,11 @@ public function up() $isCallbackTableExists = Shop::Container()->getDB()->queryPrepared("SHOW TABLES LIKE :callback", [":callback" => "%xplugin_novalnet_callback%"]); if ($isCallbackTableExists) { $previousCallBackDetails = Shop::Container()->getDB()->queryPrepared("SELECT nc.nCallbackTid callbackTid, sum(nc.nCallbackAmount) callbackAmount FROM xplugin_novalnet_callback nc, xplugin_novalnet_transaction_details nt WHERE nc.nCallbackTid = :nCallbackTid group by :nCallbackTid", [":nCallbackTid" => "nt.nNntid", ":nCallbackTid" => "nc.nCallbackTid"]); - foreach ($previousCallBackDetails as $previousCallBackDetail) { - $previousCallBackDetails = Shop::Container()->getDB()->queryPrepared("UPDATE xplugin_novalnet_transaction_details SET nCallbackAmount = :callbackamount WHERE nNntid = :nCallbackTid and nCallbackAmount IS NULL LIMIT 1", [":callbackamount" => "$previousCallBackDetail->callbackAmount", ":nCallbackTid" => "$previousCallBackDetail->callbackTid"]); - } + if (is_array($previousCallBackDetails) || is_object($previousCallBackDetails)) { + foreach ($previousCallBackDetails as $previousCallBackDetail) { + $previousCallBackDetails = Shop::Container()->getDB()->queryPrepared("UPDATE xplugin_novalnet_transaction_details SET nCallbackAmount = :callbackamount WHERE nNntid = :nCallbackTid and nCallbackAmount IS NULL LIMIT 1", [":callbackamount" => "$previousCallBackDetail->callbackAmount", ":nCallbackTid" => "$previousCallBackDetail->callbackTid"]); + } + } // After updating the values to xplugin_novalnet_transaction_details from callback history table and the delete the below table $this->execute('DROP TABLE `xplugin_novalnet_callback`'); } diff --git a/adminmenu/NovalnetBackendTabRenderer.php b/adminmenu/NovalnetBackendTabRenderer.php old mode 100755 new mode 100644 diff --git a/adminmenu/css/novalnet_admin.css b/adminmenu/css/novalnet_admin.css old mode 100755 new mode 100644 diff --git a/adminmenu/js/novalnet_admin.js b/adminmenu/js/novalnet_admin.js old mode 100755 new mode 100644 diff --git a/adminmenu/templates/novalnet_info.tpl b/adminmenu/templates/novalnet_info.tpl old mode 100755 new mode 100644 index 93e89f0..e1efe9e --- a/adminmenu/templates/novalnet_info.tpl +++ b/adminmenu/templates/novalnet_info.tpl @@ -22,5 +22,5 @@ - - + + diff --git a/adminmenu/templates/novalnet_order_details.tpl b/adminmenu/templates/novalnet_order_details.tpl old mode 100755 new mode 100644 diff --git a/adminmenu/templates/novalnet_orders.tpl b/adminmenu/templates/novalnet_orders.tpl old mode 100755 new mode 100644 diff --git a/changelog.txt b/changelog.txt index 7e58be5..0346fab 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ *** Changelog *** += 13.0.2 - 2024.01.31 = +* Fix - Plugin has been made compatible with the shop's default PayPal payment +* Enhanced - Built-in Sub-Resource Integrity (SRI) integrated for JavaScript files to improve security for preventing unauthorized modifications + = 13.0.1 - 2023.11.16 = * Fix - Minor changes were made to match the JTL coding standards diff --git a/composer.json b/composer.json old mode 100755 new mode 100644 diff --git a/frontend/NovalnetHookHandler.php b/frontend/NovalnetHookHandler.php old mode 100755 new mode 100644 index f8c0aa7..007e6d6 --- a/frontend/NovalnetHookHandler.php +++ b/frontend/NovalnetHookHandler.php @@ -188,7 +188,7 @@ public function displayNnPaymentForm(): void - +
HTML; @@ -203,6 +203,7 @@ public function displayNnPaymentForm(): void } } } - Shop::Smarty()->assign('novalnetPaymentForm', $nnPaymentFormScript); + Shop::Smarty()->assign('novalnetPaymentForm', $nnPaymentFormScript) + ->assign('cModulId', $payment->cModulId); } } diff --git a/frontend/js/novalnet_payment.js b/frontend/js/novalnet_payment.js old mode 100755 new mode 100644 diff --git a/frontend/template/account/order_details.tpl b/frontend/template/account/order_details.tpl old mode 100755 new mode 100644 diff --git a/frontend/template/checkout/inc_payment_methods.tpl b/frontend/template/checkout/inc_payment_methods.tpl old mode 100755 new mode 100644 index 01188cc..68e0a6f --- a/frontend/template/checkout/inc_payment_methods.tpl +++ b/frontend/template/checkout/inc_payment_methods.tpl @@ -39,5 +39,9 @@ {/foreach} {/radiogroup} - {$novalnetPaymentForm} + {foreach $Zahlungsarten as $zahlungsart} + {if $zahlungsart->cModulId == $cModulId} + {$novalnetPaymentForm} + {/if} + {/foreach} {/block} diff --git a/info.xml b/info.xml old mode 100755 new mode 100644 index dbea0cc..e82b8bb --- a/info.xml +++ b/info.xml @@ -7,8 +7,8 @@ 102 500 jtl_novalnet - 2023-11-16 - 13.0.1 + 2024-01-31 + 13.0.2 diff --git a/locale/de-DE/base.mo b/locale/de-DE/base.mo old mode 100755 new mode 100644 diff --git a/locale/de-DE/base.po b/locale/de-DE/base.po old mode 100755 new mode 100644 diff --git a/locale/en-GB/base.mo b/locale/en-GB/base.mo old mode 100755 new mode 100644 diff --git a/locale/en-GB/base.po b/locale/en-GB/base.po old mode 100755 new mode 100644 diff --git a/paymentmethod/NovalnetPayment.php b/paymentmethod/NovalnetPayment.php old mode 100755 new mode 100644 diff --git a/paymentmethod/NovalnetPaymentGateway.php b/paymentmethod/NovalnetPaymentGateway.php old mode 100755 new mode 100644 index f5a7aad..10e8793 --- a/paymentmethod/NovalnetPaymentGateway.php +++ b/paymentmethod/NovalnetPaymentGateway.php @@ -130,7 +130,7 @@ public function generatePaymentParams(?object $order = null): array 'amount' => $this->novalnetPaymentHelper->getOrderAmount(), 'currency' => Frontend::getCurrency()->getCode(), 'system_name' => 'jtlshop', - 'system_version' => Version::parse(APPLICATION_VERSION)->getOriginalVersion() . '-NN13.0.1-NNTjtlshop_'.$themeName, + 'system_version' => Version::parse(APPLICATION_VERSION)->getOriginalVersion() . '-NN13.0.2-NNTjtlshop_'.$themeName, 'system_url' => Shop::getURL(), 'system_ip' => $this->novalnetPaymentHelper->getNnIpAddress('SERVER_ADDR') ]; @@ -732,7 +732,7 @@ public function getMandatoryPaymentParameters(array &$paymentRequestData): void ]; } // Process the MB Way - $_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile'] = !empty($_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile']) ? $_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile'] : $paymentRequestData['customer']['mobile']; + $_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile'] = !empty($_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile']) ? $_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile'] : (!empty($paymentRequestData['customer']['mobile']) ? $paymentRequestData['customer']['mobile'] : ''); if (!empty($_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile'])) { $paymentRequestData['customer']['mobile'] = $_SESSION['novalnet']['seamless_payment_form_response']['booking_details']['mobile']; } diff --git a/paymentmethod/novalnet.png b/paymentmethod/novalnet.png old mode 100755 new mode 100644 diff --git a/paymentmethod/template/novalnet_payment.tpl b/paymentmethod/template/novalnet_payment.tpl old mode 100755 new mode 100644 diff --git a/src/NovalnetPaymentHelper.php b/src/NovalnetPaymentHelper.php old mode 100755 new mode 100644 diff --git a/src/NovalnetWebhookHandler.php b/src/NovalnetWebhookHandler.php old mode 100755 new mode 100644