0

My Magento store was working perfectly until I added a few new products recently. On addition of new products, the payment stopped functioning properly. I have CCaveneue payment gateway although payments are successful post-checkout when the page redirects back to show a successful payment received i get a 500 internal server error.

I switched on developer mode to understand the error The error received was

Fatal error: Uncaught Error: Call to a member function getMethodInstance() on boolean in
/var/www/magento/app/code/core/Mage/Payment/Model/Observer.php:46 Stack trace: #0
/var/www/magento/app/code/core/Mage/Core/Model/App.php(1358): Mage_Payment_Model_Observer-
salesOrderBeforeSave(Object(Varien_Event_Observer)) #1
/var/www/magento/app/code/core/Mage/Core/Model/App.php(1337):
Mage_Core_Model_App->_callObserverMethod(Object(Mage_Payment_Model_Observer), 'salesOrderBefor...',
Object(Varien_Event_Observer)) #2 /var/www/magento/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('sales_order_sav...', Array) #3
/var/www/magento/app/code/core/Mage/Core/Model/Abstract.php(391):
Mage::dispatchEvent('sales_order_sav...', Array) #4
/var/www/magento/app/code/core/Mage/Sales/Model/Order.php(2117): Mage_Core_Model_Abstract->_beforeSave()
#5 /var/www/magento/app/code/core/Mage/Core/Model/Abstract.php(316): Mage_Sales_Model_Order-
_beforeSave() #6 /var/www/magento/app/code/local/Mage/Ccavenuepay/controllers/CcavenuepayController.php(2 
in /var/www/magento/app/code/core/Mage/Payment/Model/Observer.php on line 46

Why is this error coming suddenly and how can I fix it, I have tried clearing Magento cache and reindexing data but it doesn't help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.