Magento: Get Payment Method name using Order ID

  • Avinash
  • 2
  • May 16, 2013
  • Tips & Tricks

In this quick tip we will see how how we can get Payment Method name using the Magento Order ID.

This will be very useful when you dealing with creating your own extension. Here article title is self explanatory that we are trying to accomplish, so without wasting time let’s look at the code block.

$order = new Mage_Sales_Model_Order(); $order_id = '00000001'; $order->loadByIncrementId($order_id); $payment_method = $order->getPayment()->getMethodInstance()->getTitle();
$order = new Mage_Sales_Model_Order();
$order_id = '00000001';

$payment_method = $order->getPayment()->getMethodInstance()->getTitle();

This is so easy, isn’t it? Do you have any better method than above to get Payment Method name from Order ID in Magento.

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by:

  • Adam Jhon

    Avinash, it’s the simplest and easiest method to get payment method “Magento Order ID”. Thanks for sharing quality stuff.

    Vancouver Designer

  • alandot spiders

    thank you for sharing such a great and informative article with us,your article makes the payment work easy through magento order id,