Question

I'm running Magento 1.6.2.

I need to determine if an order is paid. If yes, I generate some XML data for export. There is many cases in the Magento order/payment/shipment workflow.

My first guess is when the attribute "state" of the order is defined as "processing", but I'm not sure because of the large amount of possibilities in this workflow. May be this case is not covering all the possibilities ...

Am I right with that ?

Was it helpful?

Solution

You can call $order->getBaseTotalDue(). If this is 0, the order is fully paid.

OTHER TIPS

See Andreas answer on how to determine if there is anything left to pay. To answer your other question - using state == processing is not good enough. A quick test to show this is to ship an unpaid order - this will also move an order to the processing state even though the order is still unpaid.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top