2

When creating an order at the backend, we get The requested Payment Method is not available!". Our exception is thrown at /app/code/core/Mage/Payment/Model/Info.php in function getMethodInstance.

The payment method is working at regular online orders, but not via the backend. We have this problem after updating to Magento 1.9.1.1 .

I believe that $instance is set, but I am not able to find setInfoInstance method to debug this further. Where can I find it?

The requested payment method is in the list of the active payment methods. Is it possible, that an other non used payment method is responsible for this trouble Then: How can I find out, which payment method causes the issue?

Also m2epro import has the same problems.

  • did you update any modules? – paj Aug 31 '15 at 16:01
5

The following was working:

app/code/core/Mage/Payment/Model/Info.php

public function getMethodInstance()
{
    if (!$this->hasMethodInstance()) {
        if ($this->getMethod()) {
            $instance = Mage::helper('payment')->getMethodInstance($this->getMethod());
            if ($instance) {

                $instance->setInfoInstance($this);

                $this->setMethodInstance($instance);

                return $instance;
            }
        } else {

            $instance = Mage::helper('payment')->getMethodInstance('banktransfer');
            if ($instance) {

                $instance->setInfoInstance($this);

                $this->setMethodInstance($instance);

                return $instance;
            }
        }
        Mage::throwException(Mage::helper('payment')->__('The requested Payment Method is not available!!'));
    }

    return $this->_getData('method_instance');
}

2

Not all payment methods allow ordering from the backend. However, since you say it was working prior to an update, it's unlikely that is the problem.

But, just in case. If you have a peek at

app/code/core/Mage/Payment/Modal/Method/Purchaseorder.php

you should see something like:

protected $_canUseInternal = true;
protected $_canUseCheckout = false;

You could copy this to your local code pool and modify the booleans to allow ordering from the backend (if this is your issue).

  • Seems to be correct, when I debug the code: – Matthias Jaekle Jun 23 '15 at 8:43

protected by Community Sep 21 '16 at 10:05

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.