我在创建订单后尝试调用Observer,并且已经捕获了付款.到目前为止我已经尝试过; checkout_submit_all_after,sales_order_payment_place_end,sales_order_place_after,sales_order_payment_pay,sales_order_payment_capture,sales_order_payment_transaction_save_after
仅举几个主要内容.我还记录了dispatchEvent()中的所有Event Dispaches,但发现什么都没有突出,只在我需要它时被触发.我遇到的问题是,订单的状态总是以太网"付款待定"或之前的事情; 意思是我不知道订单会失败还是成功.
我的目标是仅在成功的订单上启动功能.谢谢.
经过更多的测试,我发现以下观察者可以做到这一点;
checkout_onepage_controller_success_action
这只返回订单ID,所以;
$order_id = $observer->getData('order_ids');
$order = Mage::getModel('sales/order')->load($order_id);
Run Code Online (Sandbox Code Playgroud)
并且您看到订单状态为"正在处理"且付款已被批准(或未批准).