开发者

What's the earliest possible observer to hook into after payment in Magento?

I'm looking to add some data generated after payment (API key) that I can then add into the email that goes out confirming the order. So far every event I've tried happens either too soon (before payment) or too late (the email is gone already).

What I could really use is not just a list of events, but the order in which they trigger.. I've tried several, including sales_order_payment_pay, sales_order_pla开发者_开发技巧ce_before, checkout_onepage_controller_success_action and so on..


Add some temporary debugging code to app/Mage.php

File: app/Mage.php    
public static function dispatchEvent($name, array $data = array())
{       
    Mage::Log('Event: ' . $name);
    //use below line of calling Mage::Log doesn't work (happens in rare cases)
    //file_put_contents('/tmp/events.log',"$name\n",FILE_APPEND);
    Varien_Profiler::start('DISPATCH EVENT:'.$name);
    $result = self::app()->dispatchEvent($name, $data);
    #$result = self::registry('events')->dispatch($name, $data);
    Varien_Profiler::stop('DISPATCH EVENT:'.$name);
    return $result;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜