24 private $paymentMethodList;
29 private $integrationFactory;
34 private $storeManager;
39 private $integrations;
52 $this->paymentMethodList = $paymentMethodList;
53 $this->integrationFactory = $integrationFactory;
55 $this->integrations = [];
66 if (!isset($this->integrations[
$storeId])) {
69 return $this->integrations[
$storeId];
98 return $this->
getList($this->storeManager->getStore()->getId());
111 return $this->
getByToken($paymentToken, $this->storeManager->getStore()->getId());
120 private function findIntegrations(
int $storeId): array
123 foreach ($this->paymentMethodList->getActiveList(
$storeId) as $paymentMethod) {
124 if ($this->isIntegrationAvailable($paymentMethod,
$storeId)) {
125 $integrations[] = $this->integrationFactory->create($paymentMethod,
$storeId);
128 return $integrations;
152 private function isIntegrationAvailable(VaultPaymentInterface $paymentMethod,
$storeId): bool
154 $data = $paymentMethod->getConfigData(
'instant_purchase',
$storeId);
155 if (!is_array(
$data)) {
158 if (isset(
$data[
'supported']) &&
$data[
'supported'] !==
'1') {
getByTokenForCurrentStore(PaymentTokenInterface $paymentToken)
getByToken(PaymentTokenInterface $paymentToken, int $storeId)
__construct(PaymentMethodList $paymentMethodList, IntegrationFactory $integrationFactory, StoreManagerInterface $storeManager)