Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use Plugin\s360_unzer_shop5\src\Utils\Logger;
use Plugin\s360_unzer_shop5\src\Utils\SessionHelper;
use Smarty;
use Smarty\Template;
use Smarty_Internal_Template;
use SmartyException;
use Throwable;
Expand Down Expand Up @@ -168,25 +169,27 @@ public function boot(Dispatcher $dispatcher): void
* - show template even if description is empty
*/
try {
Shop::Smarty()->unregisterPlugin(JTLSmarty::PLUGIN_FUNCTION, 'getHelpDesc');
Shop::Smarty()->registerPlugin(JTLSmarty::PLUGIN_FUNCTION, 'getHelpDesc', function (array $params, Smarty_Internal_Template $smarty) {
$placement = $params['placement'] ?? 'left';
$cID = !empty($params['cID']) ? $params['cID'] : null;
$iconQuestion = !empty($params['iconQuestion']);
$description = isset($params['cDesc'])
? \str_replace('"', '\'', __(trim($params['cDesc'])))
: null;

if (empty($description)) {
return '<div style="width: 1.25em"></div>';
}
if (!defined('SMARTY_LEGACY_MODE') || \SMARTY_LEGACY_MODE) {
Shop::Smarty()->unregisterPlugin(Smarty::PLUGIN_FUNCTION, 'getHelpDesc');
Shop::Smarty()->registerPlugin(Smarty::PLUGIN_FUNCTION, 'getHelpDesc', function (array $params, Template|Smarty_Internal_Template $smarty) {
$placement = $params['placement'] ?? 'left';
$cID = !empty($params['cID']) ? $params['cID'] : null;
$iconQuestion = !empty($params['iconQuestion']);
$description = isset($params['cDesc'])
? \str_replace('"', '\'', __(trim($params['cDesc'])))
: null;

if (empty($description)) {
return '<div style="width: 1.25em"></div>';
}

return $smarty->assign('placement', $placement)
->assign('cID', $cID)
->assign('description', $description)
->assign('iconQuestion', $iconQuestion)
->fetch('tpl_inc/help_description.tpl');
});
return $smarty->assign('placement', $placement)
->assign('cID', $cID)
->assign('description', $description)
->assign('iconQuestion', $iconQuestion)
->fetch('tpl_inc/help_description.tpl');
});
}
} catch (Throwable $th) {
// silently discard as we only try to fix the core behavior
}
Expand Down Expand Up @@ -394,7 +397,7 @@ private function registerSmartyPhpFunctions(JTLSmarty $smarty): void
$smarty->registerPlugin(Smarty::PLUGIN_MODIFIER, 'password_hash', '\password_hash');
$smarty->registerPlugin(Smarty::PLUGIN_MODIFIER, 'number_format', '\number_format');
$smarty->registerClass("\\UnzerSDK\\Constants\\PaymentState", "\\UnzerSDK\\Constants\\PaymentState");
} catch (SmartyException $e) {
} catch (SmartyException|Smarty\Exception $e) {
// probably already registered by different plugin
}
}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.8.2] (September 2025)
### Added
- added JTL 5.6 compatability

## [1.8.1] (June 2025)
### Added
- added JTL 5.5 and PHP 8.4 compatability
Expand Down
52 changes: 45 additions & 7 deletions checksums.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
4db0ef5803b943bc62cf9a6e0f7b40b5;Seeders/Shop4PluginMigrationSeeder.php
e1b9ba833fa2eae5ce86ea735f13d3ad;.babelrc
0d6ba0f68cb7716a858dd8be454fabe6;CHANGELOG.md
74bf8e5f571cac0b9df85d4ff7c6a8fb;CHANGELOG.md
c9f6e33220cf462393c7070cffcfff1a;NOTICE
bdab240d9f8ee3c00116400e934ca225;locale/de-DE/base.mo
efdf0b7b90984a3a2edb35a789f88248;locale/de-DE/base.po
Expand Down Expand Up @@ -38,8 +38,8 @@ a73ea5c19bab6939e41d81018eb6c8e4;src/Charges/ChargeHandler.php
cdd8473949f46c33f6eda27bf3df5df5;src/Utils/Config.php
48830baed39f5710178337ad6d6f8444;src/Utils/TranslatorTrait.php
ff2e8ea1952f33020fe432ab359624d6;src/Utils/JtlLinkHelper.php
8f2caa19fb7682dcb18361609d625d05;src/Utils/Compatibility.php
d46480f934c97334f23fae23b7343deb;src/Utils/SessionHelper.php
45d77592d5be177698832b19d2f84b78;src/Utils/Compatibility.php
4e1879d90f1a57b9c526919337e0de85;src/Utils/SessionHelper.php
d5d5d79ab6d86b5a965cf17240ff601e;src/Utils/JtlLoggerTrait.php
521e61755ca1485bfe834b40a50ac426;src/Utils/Logger.php
a78e5bba0c2635642ab607fbf73b0cea;src/Foundation/EventPayload.php
Expand All @@ -52,7 +52,7 @@ fda45f203428056c6676cf83a15b4387;src/Foundation/Seeder.php
07e542740aeb10d40b387b86ff17ca15;src/Foundation/Struct.php
8670bbececd78c3c6a8e52dd9105dc1d;src/Webhooks/PaymentEventSubscriber.php
6f67c55f48343fe977839454503b419a;src/Payments/PaymentMethodModuleFactory.php
c9906b5bb77b052053d6f30197354631;src/Payments/PaymentHandler.php
487dd79e26e4a3f95778eecc0f4e45cd;src/Payments/PaymentHandler.php
d78c74c0918be9b079a8cf4655446589;src/Payments/Traits/HasState.php
1dc91617834a5b508913f5266b6e509a;src/Payments/Traits/HasCustomer.php
54f0fff5386a4145ce981a2c4e24d576;src/Payments/Traits/SupportsB2B.php
Expand All @@ -62,15 +62,15 @@ aa1212a34a1c3b4f1475e6b439603404;src/Payments/Traits/HasMetadata.php
eafbb3fd550ede774e80f963759e71ea;src/Payments/Traits/HasPayStatus.php
4358bf25129c1cb3615eb2d37fc63285;src/Payments/Traits/CancelPaymentTransaction.php
7e92f962e6b3493af18618d393feb691;src/Payments/HeidelpayApiAdapter.php
f39b9c7f0a70380be58eb6873474cd22;src/Payments/HeidelpayPaymentMethod.php
25d79756477865b5c7ac6d4ea26c584c;src/Payments/HeidelpayPaymentMethod.php
b40a39212fa05718f866b4326766043c;src/Payments/Interfaces/RedirectPaymentInterface.php
ab1b1e5c0f257e793786fd8f49b3a9b7;src/Payments/Interfaces/NotificationInterface.php
04525b7293527904b5c527dd5aecbd9b;src/Payments/Interfaces/HandleStepReviewOrderInterface.php
36e5aa72d873a51ef1c3bd79a32acade;src/Payments/Interfaces/HandleStepAdditionalInterface.php
5a17589c176c45aedb1879dc120fcf86;src/Payments/Interfaces/CancelableInterface.php
ac4adca913172393fba84fda8c388a10;src/Payments/Interfaces/PaymentStatusInterface.php
d98195f0c1485f6412b599b3f1581902;src/Payments/Interfaces/HasPayButton.php
bbc9c3875307fcc8ac77578d80d67bb9;info.xml
d0f2f1110b67eb7ac7e5bcfb6616f85d;info.xml
780b2b8990e8dba5534b2d1fa468c6f3;frontend/webhook.php
d1cefc6592de8b40196a42fe29bf0b90;frontend/js/unzer.js
14347895d75c97975bd9fb96b1045f45;frontend/js/unzer.min.js
Expand Down Expand Up @@ -105,6 +105,44 @@ c33ab12c2ff6b0a4be832b1fd5ccc258;paymentmethod/UnzerTwint.php
19e3cd123fae1aa360a07d1747e6ecf3;paymentmethod/HeidelpaySofort.php
ff265b66834c64de1f1508dfa15b5de7;paymentmethod/UnzerGooglePay.php
04f239d9194556e5a43ef6c6b6168f43;paymentmethod/HeidelpayGiropay.php
42c7ad35e8af3ad82382186c8298dab9;paymentmethod/images/BSW.svg
e9b9822db699305c6f9210f7a3296d99;paymentmethod/images/Bancontact.svg
fb784caff77782c7565f05dd9f7169c0;paymentmethod/images/GooglePay.svg
deffe706f4a891a574e7cee8de6b270a;paymentmethod/images/EPS.svg
a25d1f684f60c0372468352a886400d5;paymentmethod/images/DirectDebitSecuredWL.svg
9f1aab802b3871c63d4d09bd3da192c3;paymentmethod/images/DirectBankTransferWL.svg
e7fbc85757e1eb0871c754b2c9b58b53;paymentmethod/images/WERO.svg
83be4dbf852592b57ff1e09ec2322000;paymentmethod/images/Maestro.svg
f2e9bceec235785b045ec2425c2132ae;paymentmethod/images/Przelewy24.svg
2a6d8c8faa5efe529264d7ec1d647271;paymentmethod/images/Card.svg
105cc584857fda62a05e01bfc4720c25;paymentmethod/images/SEPA.svg
13ae581ecb97d1b433878157841e6b7b;paymentmethod/images/Unzer.svg
05c4980d25c03be54dbb3c9b9297f0af;paymentmethod/images/Postfinance.svg
a109a629e837814ec51e2fd779bebc74;paymentmethod/images/UnionPay.svg
0905c27f27902dd0e5bbe1c9ba398b83;paymentmethod/images/JCB.svg
021bc5a8d698a489260095fb8818efd3;paymentmethod/images/WeChatPay.svg
b9cdbc0eb6401b4ff48d586303496360;paymentmethod/images/InstalmentWL.svg
52a89f4db375db973578516d1cfb25b4;paymentmethod/images/Girocard.svg
ce4745a7e20bb3bd0ca39aa5b532eb94;paymentmethod/images/PayU.svg
1858e4911c102b5f7dab5abcf9da0daf;paymentmethod/images/Twint.svg
6a25cb09f7ed0d96cad7500bee57ad19;paymentmethod/images/Giropay.svg
36dc54e9a212afc559462b482399025c;paymentmethod/images/Ideal.svg
6be1e109a5d12de65d2c9ac3929d1569;paymentmethod/images/PrepaymentWL.svg
7e71060e52f4b304035ca502969ebe10;paymentmethod/images/Amex.svg
73915245a686ef8ab48e054c73d84d9f;paymentmethod/images/Vpay.svg
1857d98d3decde26435a4589aa934a64;paymentmethod/images/Visa.svg
02a2accc3b4c1e5dcca722a167065d55;paymentmethod/images/Sofort.svg
9b6862348700dd4fe0abe246eba85980;paymentmethod/images/InvoiceWL.svg
97301dfb7f296851b5c3d01f5f1459ce;paymentmethod/images/Discover.svg
8b82b6046395a8521d9a4fc0b32050cc;paymentmethod/images/AVS.svg
8c15e349d78dc6c274cccc4667ff31b2;paymentmethod/images/Paypal.svg
dfff929c0326e124533fd052032f4300;paymentmethod/images/ApplePay.svg
2a261e61b7f07518c8966fed02c263c2;paymentmethod/images/Mastercard.svg
7bad27c8e7b1fce0bc73a511b45cd133;paymentmethod/images/Diners.svg
1341038e6589ce645ddad4a4508e647c;paymentmethod/images/Alipay.svg
eba887c1728b645dd11069641d0f87f0;paymentmethod/images/Klarna.svg
405ab8956305746a8bfe2f10955d367a;paymentmethod/images/Default.svg
c54827f609af6413fd016ba0a734157b;paymentmethod/images/Cash.svg
5a0016ce6c3bee1d745985b077ef9601;paymentmethod/HeidelpayFlexiPayDirect.php
1230412f2ecb13ad6bdec7d5efb263f7;paymentmethod/UnzerApplePayV2.php
1ef765d0ee365680c13dc50356da8aa4;paymentmethod/HeidelpayPrepayment.php
Expand Down Expand Up @@ -154,7 +192,7 @@ c65a3c33c1ee600a39978def51d21510;paymentmethod/HeidelpayInvoiceGuaranteed.php
1f91db143a39995cc686619f6c4a882c;paymentmethod/HeidelpaySEPADirectDebitGuaranteed.php
e569da9af0bcb8225ff8f3d6c949f418;apple-developer-merchantid-domain-association
e73740baa8bcab9ac6d47b2a95daa826;jsconfig.json
dc1c2234c6d677f57fab5413554bdc95;Bootstrap.php
a7e6375df510a55e0f6b1a4fc8b5d206;Bootstrap.php
c2405627e35992f208ba7281a6490256;adminmenu/scss/admin.scss
ef5d72b877de66653e21bf6cafd03bd5;adminmenu/js/keypairs.js
593e3e1024084fc1ee04e38a3a2e3ad7;adminmenu/js/admin.js
Expand Down
25 changes: 24 additions & 1 deletion info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<URL>http://www.solution360.de</URL>
<XMLVersion>100</XMLVersion>
<MinShopVersion>5.0.0</MinShopVersion>
<Version>1.8.1</Version>
<Version>1.8.2</Version>
<PluginID>s360_unzer_shop5</PluginID>
<CreateDate>2020-10-27</CreateDate>

Expand Down Expand Up @@ -308,6 +308,7 @@
<PaymentMethod>
<Method>
<Name><![CDATA[Unzer Kreditkarte]]></Name>
<PictureURL>images/Card.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -333,6 +334,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Lastschrift]]></Name>
<PictureURL>images/SEPA.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -358,6 +360,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Lastschrift (secured)]]></Name>
<PictureURL>images/SEPA.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -383,6 +386,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Rechnung]]></Name>
<PictureURL>images/InvoiceWL.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -408,6 +412,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Rechnung (secured)]]></Name>
<PictureURL>images/InvoiceWL.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -433,6 +438,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Rechnung (Jetzt kaufen, Später bezahlen)]]></Name>
<PictureURL>images/InvoiceWL.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand Down Expand Up @@ -483,6 +489,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer PayPal]]></Name>
<PictureURL>images/Paypal.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -508,6 +515,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer SOFORT]]></Name>
<PictureURL>images/Sofort.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -533,6 +541,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Giropay]]></Name>
<PictureURL>images/Giropay.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -558,6 +567,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Przelewy24]]></Name>
<PictureURL>images/Przelewy24.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -583,6 +593,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer iDEAL]]></Name>
<PictureURL>images/Ideal.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -608,6 +619,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Vorkasse]]></Name>
<PictureURL>images/PrepaymentWL.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -633,6 +645,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer EPS]]></Name>
<PictureURL>images/EPS.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand Down Expand Up @@ -683,6 +696,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Alipay]]></Name>
<PictureURL>images/Alipay.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -708,6 +722,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer WeChat Pay]]></Name>
<PictureURL>images/WeChatPay.svg</PictureURL>
<Sort>0</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand Down Expand Up @@ -765,6 +780,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Apple Pay]]></Name>
<PictureURL>images/ApplePay.svg</PictureURL>
<Sort>10</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -790,6 +806,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Bancontact]]></Name>
<PictureURL>images/Bancontact.svg</PictureURL>
<Sort>20</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -815,6 +832,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Ratenzahlung (Paylater)]]></Name>
<PictureURL>images/InstalmentWL.svg</PictureURL>
<Sort>30</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -840,6 +858,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Lastschrift (Paylater)]]></Name>
<PictureURL>images/Default.svg</PictureURL>
<Sort>40</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -865,6 +884,7 @@
</Method>
<Method>
<Name><![CDATA[Unzer Google Pay]]></Name>
<PictureURL>images/GooglePay.svg</PictureURL>
<Sort>50</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand Down Expand Up @@ -1010,6 +1030,7 @@

<Method>
<Name><![CDATA[Unzer TWINT]]></Name>
<PictureURL>images/Twint.svg</PictureURL>
<Sort>60</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand All @@ -1036,6 +1057,7 @@

<Method>
<Name><![CDATA[Unzer Apple Pay v2]]></Name>
<PictureURL>images/ApplePay.svg</PictureURL>
<Sort>15</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand Down Expand Up @@ -1072,6 +1094,7 @@

<Method>
<Name><![CDATA[Unzer Direct Bank Transfer]]></Name>
<PictureURL>images/DirectBankTransferWL.svg</PictureURL>
<Sort>70</Sort>
<SendMail>1</SendMail>
<Provider><![CDATA[Unzer]]></Provider>
Expand Down
Loading