久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

在付款捕獲后調用 Magento 事件觀察器

Calling a Magento event Observer AFTER payment capture(在付款捕獲后調用 Magento 事件觀察器)
本文介紹了在付款捕獲后調用 Magento 事件觀察器的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試在訂單創建后調用觀察員,并在付款后被捕獲.到目前為止,我已經嘗試過;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

Im trying to call an Observer after the order has been created, and AFTER payment has been captured. So far I've tried; 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() 中記錄了所有事件調度,但沒有發現任何突出的東西,只有在我需要它時才會被觸發.我遇到的問題是訂單的狀態始終是付款待處理"或在此之前的狀態;這意味著我不知道訂單會失敗還是成功.

Just to name the main ones. I've also logged all Event Dispaches inside dispatchEvent() but found nothing that stands out and is only fired when i need it. the issue i'm having is that the status of the order is always ether 'Payment Pending' or something that predated this; meaning that i don't know whether the order will fail or succeed.

我的目標是僅在成功的訂單上觸發一個函數.謝謝.

My aim, is to fire a function only on successful orders. thanks.

推薦答案

經過多次測試,我發現以下 Observer 可以解決問題;

after much more testing i found the following Observer to do the trick;

checkout_onepage_controller_success_action

這僅返回訂單 ID,所以;

This returns just the order id, so;

$order_id = $observer->getData('order_ids');
$order = Mage::getModel('sales/order')->load($order_id);

并且您看到訂單狀態為處理中"并且付款已批準(或未批準).

and you see that the order status is 'processing' and the payment is aproved (or not).

這篇關于在付款捕獲后調用 Magento 事件觀察器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 国产精品视频久久久 | 嫩草视频免费 | 国产色视频网站 | 夜夜骑首页 | 日本色综合 | 日韩一区二区免费视频 | 91精品综合久久久久久五月天 | 久久婷婷av| 狠狠操天天干 | 欧美一级欧美一级在线播放 | 国产福利在线 | 亚洲精品视频久久 | 不卡一区二区三区四区 | 久久99精品久久 | 丝袜一区二区三区 | 欧美韩一区二区 | 精品国产91 | 在线日韩视频 | 精品国偷自产在线 | 亚洲精品久 | 中国一级特黄毛片大片 | 亚洲中午字幕 | 三级成人在线 | 中文字幕在线看人 | 97成人在线 | 日韩国产免费观看 | 精品一区二区三区在线观看 | 亚洲中国字幕 | 成人美女免费网站视频 | 九九视频在线观看视频6 | 夜夜夜夜草| 精品欧美二区 | 国产一区二区在线播放 | 久久黄色精品视频 | 欧美色a v| 日韩欧美国产精品一区二区 | 国产高清视频 | 久久91精品国产一区二区三区 | 综合久久久久 | 91精品久久久久久久久中文字幕 | 一区二区久久电影 |