I need to run a very simple function when an order is set to complete and/or if the payment was successful.

If it's relevant we're using Global Transport for payment. I mention it mostly because where I expect to see an order status go from "pending" to "complete" (as per documentation) it seems to stay as "pending"... this is possibly a red herring.

I'm almost losing track of the things I've tried:

  • sales_order_invoice_save_after
  • sales_order_payment_pay
  • sales_order_place_after
  • sales_order_payment_place_end

To be clear: I only need to run this function when payment is received for an order. These seem to run, but when I try to capture the order/payment object it's always "pending".


You have this observer:


The observer return order_ids :

class Namespace_Modulename_Model_Observer
    public function customFunction(Varien_Event_Observer $observer)
        $order = $observer->getData('order_ids');
         //here you can add your custom code


  • this is great. I was hung up on trying to look too closely and track payment itself, but of course this works. – user5482 May 7 '15 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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