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:
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".