magento:get list of all available payment method

mahdi  picture mahdi · Sep 22, 2014 · Viewed 10.4k times · Source

how can i get list of payment methods with detail like code,title,method and? is it possible get available payment method in store with API ? i need list of all available payment method in magento store.

Answer

Amaresh Tiwari picture Amaresh Tiwari · Sep 4, 2015

Here You can get all available payment methods in Magento

If for any reason you need to a get a list with all payment methods in Magento, you can do it easily by using the payment config class (app/code/core/Mage/Payment/Model/Config.php).

To get a list with all payments active and inactive:

  • $allAvailablePaymentMethods = Mage::getModel('payment/config')->getAllMethods();

To get a list with all active payment methods:

  • $allActivePaymentMethods = Mage::getModel('payment/config')->getActiveMethods();

To get a list with all credit cards that Magento supports:

  • $allCcTypes = Mage::getModel('payment/config')->getCcTypes();