From 0bff35bef6318348adfd8698c5c7da9b3c5283de Mon Sep 17 00:00:00 2001 From: Manuel Mesquita Date: Wed, 19 Feb 2025 00:01:40 +0000 Subject: [PATCH] SMP-3065 - fix for bedrock installations on applepay allowed domains --- src/Controller/ApplePay.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/ApplePay.php b/src/Controller/ApplePay.php index 1fba5d09..cbaab398 100644 --- a/src/Controller/ApplePay.php +++ b/src/Controller/ApplePay.php @@ -145,7 +145,8 @@ public function checkApplePay(){ //$account has permissions to use apple_pay $auth = isset($account['payment_methods']['apple_pay']['enabled']) && $account['payment_methods']['apple_pay']['enabled']; - $auth_domains = in_array(strtr(get_site_url(), array("http://" => "", "https://" => "")), $account['payment_methods']['apple_pay']['allowed_domain_names']); + $domain = parse_url(get_site_url()); + $auth_domains = in_array($domain["host"], $account['payment_methods']['apple_pay']['allowed_domain_names']); //lost auth if(!($auth && $auth_domains)){