Enabling Magento payment methods for backend orders

In this post I show how you can use Purchase Order to fulfill orders made through the Magento backend. This is easy to apply to other payment extensions.

Magento has a great, albeit lesser known feature that allows you to create orders in the backend. This is especially handy for stores that also take orders by phone because this allows them to utilize Magento’s inventory status, coupons etc. but the order is also registered in Magento’s statistics, providing a clearer picture.

Sadly there aren’t that many payment methods that allow transactions from the backend of Magento. Of course this is because in most cases this would require you to know the payment data of your client. In my case a client of mine wanted to create orders in the backend for the customers who would order by phone, come to the store to pick up the order and pay in cash. To achieve this I copied ‘/app/code/core/Mage/Payment/Model/Method/Purchaseorder.php’ to the local pool and added these two lines in the body of the class.

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

The first variable allows the payment method to be used in the backend if set to true. The second blocks it from being used in the frontend if set to false. So If you still want to use purchase order to be used in the frontend just set it to true.

I’ve picked purchase order because this allows my client to give the order some identifier so it’s easier to recognize afterwards. Of course you can pick just about any payment method that is available, however keep in mind that if a payment method works in the front end it doesn’t necessarily work in the backend.

Author: Luc De Brouwer

Mild-mannered software engineer, Nine Inch Nails lover, gin drinker, cat person, and somewhat of a geek. Ron Swanson is my spirit animal.

5 thoughts on “Enabling Magento payment methods for backend orders”

  1. Hi Luc,

    Thank you for sharing the information.
    I was reading this and trying to figure out what you did.

    So you copied the file and placed it in “the local pool” but which folder is this where can I trace back the steps you made?



    1. With local pool I mean the local folder in /app/code. You don’t want to edit core files and lose your alterations with upgrades. If you copy the required files/folders from the core folder to the local folder you can safely edit those and still run updates ( as long as the extension isn’t changed significantly ).

  2. Hi,

    Got this working fine. Just what I have been looking for, but is it possible to have it then update the transaction log with the payment details.



Comments are closed.