I have a working observer using sales_order_place_after
and I am changing it to use sales_order_invoice_pay
. Is this is the correct method? Will this to fire only if the invoice is fully paid, front-end or admin? My test seems to indicate this is correct but I'd appreciate a look.
in Observer.php
$invoice = $observer->getEvent()->getInvoice();
$order = $invoice->getOrder();
if (!$order->canInvoice() ) {
Mage::getModel('myapps_orderman/export_mscrmapi')
->exportOrder($order);
}