I am shortening the one page checkout page as my store will not have payment option and shipping selection option. I am following below blog
Everything works fine till place order after the review section. Upon clicking on the place order button I am getting below error
The requested Payment Method is not available.
My controller section to set payment mode is as below
$quote = Mage::getSingleton('checkout/session')->getQuote();
$methodCode = 'free';
if ($quote->isVirtual()) {
$quote->getBillingAddress()->setPaymentMethod($methodCode);
} else {
$quote->getShippingAddress()->setPaymentMethod($methodCode);
}
$quote->save();
And the free shipping mode enabled also.
I referred below question posted before:
The requested Payment Method is not available
It is not solving my issue. No system.lo captured also.
free_free
as method code? I seem to remember it' should be something like that. Also, try placing an order with all steps enabled and check what the code for payment and shipping is in thesales_flat_order
tablesales_flat_order
table, cant see payment mode name on that table?$order = new Mage_Sales_Model_Order(); $order->loadByIncrementId($order_id); $payment_method = $order->getPayment()->getMethodInstance()->getCode();
I found the code and applied. It works fine now.