I am getting below error when I am redirected from payment gateway to merchant page. Tried to google for solution but din't find any solution for this.

Fatal error: Call to a member function getMethodInstance() on boolean in /home/website/public_html/website/homedir/public_html/app/code/core/Mage/Payment/Helper/Data.php on line 119

public function getInfoBlock(Mage_Payment_Model_Info $info)
    $blockType = $info->getMethodInstance()->getInfoBlockType();
    if ($this->getLayout()) {
        $block = $this->getLayout()->createBlock($blockType);
    else {
        $className = Mage::getConfig()->getBlockClassName($blockType);
        $block = new $className;
    return $block;

1 Answer 1


Probably you are calling getMethodInstance function somewhere in your code where your object is returning false.

You have to set if condition there. Suppose your object variable is $payment, then you have to set the if condition as given below

if ($payment->getMethodInstance()) {
    // your code
  • i not sure how it been called, i have edit the question with the existing code,Can you go through and help me out
    – NaFi
    Dec 3, 2018 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.