18 private $methodFactory;
30 \
Magento\Payment\Api\Data\PaymentMethodInterfaceFactory $methodFactory,
31 \
Magento\Payment\Helper\Data $helper
33 $this->methodFactory = $methodFactory;
42 $methodsCodes = array_keys($this->helper->getPaymentMethods());
44 $methodsInstances = array_map(
46 return $this->helper->getMethodInstance(
$code);
52 return !(
$method instanceof \Magento\Payment\Model\Method\Substitution);
62 $methodList = array_map(
65 return $this->methodFactory->create([
66 'code' => (
string)$methodInstance->
getCode(),
67 'title' => (string)$methodInstance->
getTitle(),
75 return array_values($methodList);
83 $methodList = array_filter(
90 return array_values($methodList);
__construct(\Magento\Payment\Api\Data\PaymentMethodInterfaceFactory $methodFactory, \Magento\Payment\Helper\Data $helper)
getConfigData($field, $storeId=null)