I had overridden the PayPal standard controller (Magento enterprise 1.13) to change the status of the successful orders to "Processing". It worked fine in the development environment (sandbox paypal) but "http".
The same functionality did not work in live(sandbox paypal). This was with "https".
First it threw "General lock wait timeout error". So I increased the value to 300 which was set in development environment as well and my functionality worked. Presuming this could be the issue I increased the value.
But after that it is showing peculiar behavior in "https" - sandbox paypal. It is throwing 502 bad gateway error for few orders after looping for a long time. Otherwise it is generating error report.
Pl find below my success action:
public function successAction()
{
$session = Mage::getSingleton('checkout/session');
$session->setQuoteId($session->getPaypalStandardQuoteId(true));
$order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
$state = Mage_Sales_Model_Order::STATE_PROCESSING;
$order-> setState($state);
$order-> setStatus('processing');
$order-> addStatusHistoryComment();
$order-> save();
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
}
Has anyone overriden the paypal controllers and faced any issue. Any help as a hint even would be greatly appreciated.