Question

I want to add a new functionality to magento when a particular order is succeeded. I am wondering is there any common function where all the payment gateways reaches before destroying the order session information so I can pick the new order information like customer, credit card etc for the new functionality and then redirect to the success page.

Was it helpful?

Solution

I don't think there is such a point since every method behaves differently and can/should have different callback URLs. Maybe you can get the information you need on the success page using the event controller_action_predispatch_checkout_onepage_success and use

$orderId = Mage::getSingleton('checkout/session')->>getLastSuccessQuoteId();

to get the last order id, then load the order

Mage::getModel('sales/order')->load($orderId);

and get the info you need from there.

OTHER TIPS

You can create an observer for event "checkout_onepage_controller_success_action". This is in successAction in Mage_Checkout_OnepageController.

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