From 4c2f1a27c0477fa332a905d64d98a6b0d64b830d Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Fri, 15 Nov 2024 13:12:12 +0100 Subject: [PATCH] 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]) || (