35 private $paymentMethodList;
40 private $paymentMethodInstanceFactory;
48 \
Magento\Payment\Model\Checks\SpecificationFactory $specificationFactory
51 $this->methodSpecificationFactory = $specificationFactory;
61 $availableMethods = [];
63 foreach ($this->getPaymentMethodList()->getActiveList(
$store) as
$method) {
64 $methodInstance = $this->getPaymentMethodInstanceFactory()->create(
$method);
66 $methodInstance->setInfoInstance(
$quote->getPayment());
67 $availableMethods[] = $methodInstance;
70 return $availableMethods;
82 return $this->methodSpecificationFactory->create(
100 private function getPaymentMethodList()
102 if ($this->paymentMethodList ===
null) {
104 \
Magento\Payment\Api\PaymentMethodListInterface::class
107 return $this->paymentMethodList;
115 private function getPaymentMethodInstanceFactory()
117 if ($this->paymentMethodInstanceFactory ===
null) {
119 \
Magento\Payment\Model\Method\InstanceFactory::class
122 return $this->paymentMethodInstanceFactory;
$methodSpecificationFactory
_canUseMethod($method, \Magento\Quote\Api\Data\CartInterface $quote)
const CHECK_USE_FOR_CURRENCY
const CHECK_ORDER_TOTAL_MIN_MAX
getAvailableMethods(\Magento\Quote\Api\Data\CartInterface $quote=null)
const CHECK_USE_FOR_COUNTRY
__construct(\Magento\Payment\Helper\Data $paymentHelper, \Magento\Payment\Model\Checks\SpecificationFactory $specificationFactory)