The payment method I have uses a third party gateway. I need to forward the Increment Order ID to them.
public function getOrderPlaceRedirectUrl() {
return Mage::getUrl('shopping/checkout/forwardweb', array('_secure' => true));
}
What I would like to do is to get the order and send the $order->getIncrementId()
.
I tried using $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
But for some reason, it's always returning the same order id, no matter how many times I check out my cart, and if I go to the website, and list the orders, the new orders are not being added to the list, and it's always empty.
Best Answer
You can get the last order increment id by
You will need to save reserveOrderId in quote.
Paypal express method doing the same in function
You can follow the way it is doing and send your increment id same way for your payment method.