Skip to content

Commit

Permalink
Merge pull request #1 from Novalnet-AG/v13.0.2
Browse files Browse the repository at this point in the history
V13.0.2
  • Loading branch information
Novalnet-Technic authored Jan 31, 2024
2 parents c563229 + 1d1435b commit 774ba55
Show file tree
Hide file tree
Showing 26 changed files with 23 additions and 12 deletions.
Empty file modified Bootstrap.php
100755 → 100644
Empty file.
Empty file modified Migrations/Migration20210608221920.php
100755 → 100644
Empty file.
8 changes: 5 additions & 3 deletions Migrations/Migration20230303113003.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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`');
}
Expand Down
Empty file modified adminmenu/NovalnetBackendTabRenderer.php
100755 → 100644
Empty file.
Empty file modified adminmenu/css/novalnet_admin.css
100755 → 100644
Empty file.
Empty file modified adminmenu/js/novalnet_admin.js
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions adminmenu/templates/novalnet_info.tpl
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
</div>
</div>

<link rel="stylesheet" type="text/css" href="{$adminUrl}css/novalnet_admin.css">
<script type="text/javascript" src="{$adminUrl}js/novalnet_admin.js"></script>
<link rel="stylesheet" type="text/css" href="{$adminUrl}css/novalnet_admin.css" integrity="sha384-J/zSDgUsPgkXirOOdcgZc4CTd4w2tJFKXQgSNJiUfHnRVX2Asw39ZP4HzPEb1VIk">
<script type="text/javascript" src="{$adminUrl}js/novalnet_admin.js" integrity="sha384-wLf9tKVICpQvZ4YbPa3+FJCCrvVrPQGJGGEnoKxaq2do9CdI+OTnn5JTFnlr+dMz"></script>
Empty file modified adminmenu/templates/novalnet_order_details.tpl
100755 → 100644
Empty file.
Empty file modified adminmenu/templates/novalnet_orders.tpl
100755 → 100644
Empty file.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Empty file modified composer.json
100755 → 100644
Empty file.
5 changes: 3 additions & 2 deletions frontend/NovalnetHookHandler.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function displayNnPaymentForm(): void
<iframe style="width:100%;border:0;scrolling:no;" id="v13PaymentForm" src="{$paymentFormResponseData['result']['redirect_url']}"></iframe>
<script type='text/javascript' src='https://cdn.novalnet.de/js/pv13/checkout.js'></script>
<input type="hidden" name="nn_wallet_data" id="nn_wallet_data" value="{$walletOrderDetails}">
<script type='text/javascript' src='{$pluginPath}frontend/js/novalnet_payment.js'></script>
<script type='text/javascript' src='{$pluginPath}frontend/js/novalnet_payment.js' integrity='sha384-qbry1rgKKp0UJABzBMT3Xi68UBAGchcJp3wdvZSMiN178ktNLPMVP8UkKX0Vr5Lk'></script>
<div class="card-header alert-danger text-center mb-3 d-none" id="novalnet_payment_form_error_alert"></div>
</fieldset>
HTML;
Expand All @@ -203,6 +203,7 @@ public function displayNnPaymentForm(): void
}
}
}
Shop::Smarty()->assign('novalnetPaymentForm', $nnPaymentFormScript);
Shop::Smarty()->assign('novalnetPaymentForm', $nnPaymentFormScript)
->assign('cModulId', $payment->cModulId);
}
}
Empty file modified frontend/js/novalnet_payment.js
100755 → 100644
Empty file.
Empty file modified frontend/template/account/order_details.tpl
100755 → 100644
Empty file.
6 changes: 5 additions & 1 deletion frontend/template/checkout/inc_payment_methods.tpl
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@
{/foreach}

{/radiogroup}
{$novalnetPaymentForm}
{foreach $Zahlungsarten as $zahlungsart}
{if $zahlungsart->cModulId == $cModulId}
{$novalnetPaymentForm}
{/if}
{/foreach}
{/block}
4 changes: 2 additions & 2 deletions info.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<XMLVersion>102</XMLVersion>
<ShopVersion>500</ShopVersion>
<PluginID>jtl_novalnet</PluginID>
<CreateDate>2023-11-16</CreateDate>
<Version>13.0.1</Version>
<CreateDate>2024-01-31</CreateDate>
<Version>13.0.2</Version>
<Install>
<Adminmenu>
<Customlink sort="0">
Expand Down
Empty file modified locale/de-DE/base.mo
100755 → 100644
Empty file.
Empty file modified locale/de-DE/base.po
100755 → 100644
Empty file.
Empty file modified locale/en-GB/base.mo
100755 → 100644
Empty file.
Empty file modified locale/en-GB/base.po
100755 → 100644
Empty file.
Empty file modified paymentmethod/NovalnetPayment.php
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions paymentmethod/NovalnetPaymentGateway.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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')
];
Expand Down Expand Up @@ -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'];
}
Expand Down
Empty file modified paymentmethod/novalnet.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified paymentmethod/template/novalnet_payment.tpl
100755 → 100644
Empty file.
Empty file modified src/NovalnetPaymentHelper.php
100755 → 100644
Empty file.
Empty file modified src/NovalnetWebhookHandler.php
100755 → 100644
Empty file.

0 comments on commit 774ba55

Please sign in to comment.