Do something when any order is complete or invoice paid by Magento observer
$order = $observer->getOrder(); if($order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE){ //after order complete codes }
or
$invoice = $observer->getEvent()->getInvoice(); if($invoice->getState() == Mage_Sales_Model_Order_Invoice::STATE_PAID){ //afterInvoice Paid codes }
Leave a Reply