I am integrating magento payumoney gateway.I am using payumoney extension available on payumoney website.But it's through this error
Fatal error: Call to a member function getMethodInstance() on a non-object in D:\xampp\htdocs\build\store\app\code\core\Mage\Payment\Model\Observer.php on line 46
on this url
http://localhost/build/store/index.php/payucheckout/shared/redirect/
for this I follow this https://magento.stackexchange.com/questions/31517/magento-fatal-error-call-to-a-member-function-getmethodinstance-on-a-non-obje
but can't understand what going on. my website observer code
$order = $observer->getEvent()->getOrder();
if ($order->getPayment()->getMethodInstance()->getCode() != 'free') {
return $this;
}
to remove this error i have update my magento from old version to new please help to find out.