Magento Checkout – “Unable to set Payment Method”

Thursday, 28. July 2011

I have come across this rather ambiguous error message while testing the checkout process with onepage checkout.

It’s a popup with a simple message “Unable to set Payment Method”! That’s very telling!

The truth is that Magento does in deed throw an error and it’s captured. You can quickly allow the full error to be displayed on frontend by doing the following:

Navigate to: /app/code/core/Mage/Checkout/controllers/OnepageController.php

Search for a line

$result['error'] = $this->__('Unable to set Payment Method.');

and replace it with

$result['error'] = $e->getMessage();

Try the checkout again and hopefully you should now see a more meaningful error message for a developer!

ATTENTION:
I think you have noticed you have just edited the very CORE file here! I would normally not recommend doing this. It’s much better to overwrite the controller instead.

I will leave it to your judgement but I will recommend you atleast undo your changes after you done fixing your problem.

Leave a Reply

You must be logged in to post a comment.