Skip to content

Commit

Permalink
Fixed domain association serving
Browse files Browse the repository at this point in the history
  • Loading branch information
L3RAZ committed Sep 20, 2024
1 parent 687d0e9 commit ff0a3b8
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions ps_checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -1795,30 +1795,17 @@ public function hookDisplayOrderDetail(array $params)

public function hookModuleRoutes()
{
/**
* @var \PrestaShop\Module\PrestashopCheckout\PayPal\PayPalConfiguration $paypalConfiguration
*/
$payPalConfiguration = $this->getService(\PrestaShop\Module\PrestashopCheckout\PayPal\PayPalConfiguration::class);
/**
* @var \PrestaShop\Module\PrestashopCheckout\FundingSource\FundingSourceConfigurationRepository $fundingSourceRepository
*/
$fundingSourceRepository = $this->getService(\PrestaShop\Module\PrestashopCheckout\FundingSource\FundingSourceConfigurationRepository::class);

$applePay = $fundingSourceRepository->get('apple_pay');

if ($payPalConfiguration->isApplePayEligible() && $applePay && $applePay['active']) {
return [
'ps_checkout_applepay' => [
'rule' => '.well-known/apple-developer-merchantid-domain-association',
'keywords' => [],
'controller' => 'applepay',
'params' => [
'fc' => 'module',
'module' => 'ps_checkout',
'action' => 'getDomainAssociation'
],
]
];
}
return [
'ps_checkout_applepay' => [
'rule' => '.well-known/apple-developer-merchantid-domain-association',
'keywords' => [],
'controller' => 'applepay',
'params' => [
'fc' => 'module',
'module' => 'ps_checkout',
'action' => 'getDomainAssociation'
],
]
];
}
}

0 comments on commit ff0a3b8

Please sign in to comment.