Home » Magento19 December 2016

Magento: Get Payment Methods (All/Active/Used)

This article shows how to get payment methods in Magento 1. We will be fetching 3 types of payment methods. They are:

1) All Payment Methods
2) Active/Enabled Payment Methods
3) Payment Methods that have been used while placing orders

To get all payment methods, we can either use Mage_Payment_Helper_Data or Mage_Payment_Model_Config class.

To get active payment methods, we will be using Mage_Payment_Model_Config class.

To get payment methods used in orders, we will be using Mage_Sales_Model_Resource_Order_Payment_Collection class.

Get all payment methods

Sample Output:

Sample Output:

Get all and active payment methods

Both of the above variables have similar format of output.

Sample Output:

Get used payment methods

To get all the payment methods that have been used while placing orders, we use the following code:

Sample Output:

Hope this helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed