RSS

List all payment methods in Magento

15 Jul

How to get a list with 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:

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

To get a list with all active payment methods:

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

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

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

Posted by on July 15, 2013 in Magento

 

Tags:

One response to “List all payment methods in Magento

  1. malvikiran

    July 27, 2013 at 1:15 pm

    Reblogged this on Simple PHP Blog.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: