Skip to content

Commit

Permalink
SMP-3065 - fix for bedrock installations on applepay allowed domains
Browse files Browse the repository at this point in the history
  • Loading branch information
PPmmesquita committed Feb 19, 2025
1 parent 66dccff commit 0bff35b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controller/ApplePay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)){
Expand Down

0 comments on commit 0bff35b

Please sign in to comment.