26 private $instantPurchaseOptionFactory;
36 private $paymentTokenChooser;
41 private $shippingAddressChooser;
46 private $billingAddressChooser;
51 private $shippingMethodChooser;
70 $this->instantPurchaseOptionFactory = $instantPurchaseOptionFactory;
72 $this->paymentTokenChooser = $paymentTokenChooser;
73 $this->shippingAddressChooser = $shippingAddressChooser;
74 $this->billingAddressChooser = $billingAddressChooser;
75 $this->shippingMethodChooser = $shippingMethodChooser;
85 if (!$this->isInstantPurchaseButtonEnabled(
$store)) {
86 return $this->instantPurchaseOptionFactory->createDisabledOption();
98 $option = $this->instantPurchaseOptionFactory->create(
114 private function isInstantPurchaseButtonEnabled(
Store $store): bool
116 return $this->config->isModuleEnabled(
$store->getId());
getOption(Store $store, Customer $customer)
__construct(InstantPurchaseOptionFactory $instantPurchaseOptionFactory, Config $config, PaymentTokenChooserInterface $paymentTokenChooser, ShippingAddressChooserInterface $shippingAddressChooser, BillingAddressChooserInterface $billingAddressChooser, ShippingMethodChooserInterface $shippingMethodChooser)