34 private $paymentMethodList;
39 private $paymentMethodInstanceFactory;
56 \
Magento\Payment\Helper\Data $paymentHelper,
61 $this->_paymentHelper = $paymentHelper;
64 parent::__construct($context,
$data);
79 'payment.method.' . $method->getCode(),
80 $this->_paymentHelper->getMethodFormBlock(
$method, $this->_layout)
84 return parent::_prepareLayout();
95 $checks = array_merge(
97 AbstractMethod::CHECK_USE_FOR_COUNTRY,
98 AbstractMethod::CHECK_USE_FOR_CURRENCY,
99 AbstractMethod::CHECK_ORDER_TOTAL_MIN_MAX,
100 AbstractMethod::CHECK_ZERO_TOTAL
102 $this->additionalChecks
105 return $this->methodSpecificationFactory->create($checks)->isApplicable(
121 $method->setInfoInstance($this->getQuote()->getPayment());
151 $quote = $this->getQuote();
154 foreach ($this->getPaymentMethodList()->getActiveList(
$store) as
$method) {
155 $methodInstance = $this->getPaymentMethodInstanceFactory()->create(
$method);
176 return current(
$methods)->getCode();
187 private function getPaymentMethodList()
189 if ($this->paymentMethodList ===
null) {
190 $this->paymentMethodList = ObjectManager::getInstance()->get(
191 \
Magento\Payment\Api\PaymentMethodListInterface::class
194 return $this->paymentMethodList;
203 private function getPaymentMethodInstanceFactory()
205 if ($this->paymentMethodInstanceFactory ===
null) {
206 $this->paymentMethodInstanceFactory = ObjectManager::getInstance()->get(
207 \
Magento\Payment\Model\Method\InstanceFactory::class
210 return $this->paymentMethodInstanceFactory;
getData($key='', $index=null)
setData($key, $value=null)