I'm programatically creating orders, and having problems on a single site setting the payment method.
Just before setting the method I am logging all available payment methods with:
Mage::log("All avaialable payment methods:" . print_r(Mage::getModel('payment/config')->getActiveMethods(), true), null, 'mycustom.log', true);
I've tried multiple methods that are shown in the log, and all return the error "Payment method not available". Even things like checkmo and free aren't working (both are shown as active).
Multiple sites are working just fine with exactly the same code.
- all countries are allowed, and the payment method is set to all allowed countries, on all levels
- no errors in system or exception logs (other than the exception with the mentioned error, being thrown in app/code/core/Mage/Sales/Model/Quote/Payment.php(153) )
- the payment method itself is enabled
If the line of code before shows it as active, why might the line setting the method return the error that it's not available?