From 4c2f1a27c0477fa332a905d64d98a6b0d64b830d Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Fri, 15 Nov 2024 13:12:12 +0100 Subject: [PATCH 1/4] Apple payment method not listed when not on apple machine --- src/Controller/PaymentController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Controller/PaymentController.php b/src/Controller/PaymentController.php index 69cc931..9181ad0 100644 --- a/src/Controller/PaymentController.php +++ b/src/Controller/PaymentController.php @@ -57,6 +57,13 @@ public function getPaymentList() * - country */ foreach ($paymentListRaw as $key => $payment) { + if( + $payment->getId() === 'oscadyenapplepay' && + (stripos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'Apple') !== false) + ){ + continue; + } + if ( !isset($adyenDef[$key]) || ( From afcc3ecd3aaf17d3fd52b95a5b6a1ee88347618b Mon Sep 17 00:00:00 2001 From: Mario Lorenz Date: Fri, 15 Nov 2024 15:13:18 +0100 Subject: [PATCH 2/4] this is not necessary. It is solved in the tpl --- src/Controller/PaymentController.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Controller/PaymentController.php b/src/Controller/PaymentController.php index 9181ad0..69cc931 100644 --- a/src/Controller/PaymentController.php +++ b/src/Controller/PaymentController.php @@ -57,13 +57,6 @@ public function getPaymentList() * - country */ foreach ($paymentListRaw as $key => $payment) { - if( - $payment->getId() === 'oscadyenapplepay' && - (stripos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'Apple') !== false) - ){ - continue; - } - if ( !isset($adyenDef[$key]) || ( From 5db6a9897899c67741064f5d8919097b0c2884a9 Mon Sep 17 00:00:00 2001 From: Mario Lorenz Date: Fri, 15 Nov 2024 15:15:00 +0100 Subject: [PATCH 3/4] add adyen_assets to payment-page --- views/frontend/blocks/page/checkout/select_payment.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/frontend/blocks/page/checkout/select_payment.tpl b/views/frontend/blocks/page/checkout/select_payment.tpl index c92c52c..88419e5 100644 --- a/views/frontend/blocks/page/checkout/select_payment.tpl +++ b/views/frontend/blocks/page/checkout/select_payment.tpl @@ -3,5 +3,7 @@ [{* We include it as template, so that it can be modified in custom themes *}] [{include file="modules/osc/adyen/payment/adyen_payment_inauthorisation.tpl"}] [{else}] + [{* We include it as template, so that it can be modified in custom themes *}] + [{include file="modules/osc/adyen/payment/adyen_assets.tpl"}] [{$smarty.block.parent}] [{/if}] \ No newline at end of file From f5f4914871906d4887f01d1a9a91a5fbb886dfa8 Mon Sep 17 00:00:00 2001 From: Mario Lorenz Date: Fri, 15 Nov 2024 15:19:54 +0100 Subject: [PATCH 4/4] CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3ec466..bbe05d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.1.8] - 2024-??-?? + +- use Adyen assets on the payment page again so that ApplePay is hidden if necessary. Was accidentally removed in release v1.1.7 + ## [1.1.7] - 2024-10-18 ### NEW