[HttpPost]
public void notify_url()
{
SortedDictionary<string, string> sPara = GetRequestPost();
System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " rateCount: " + "米亞回調"+DateTime.Now.ToString());
if (sPara.Count > 0)//判斷是否有帶返回參數
{
Notify aliNotify = new Notify();
bool verifyResult = aliNotify.Verify(sPara, Request.Form["notify_id"], Request.Form["sign"]);服務器
if (verifyResult)//驗證成功
{
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//請在這裏加上商戶的業務邏輯程序代碼
int rateCount = 0;
System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " rateCount: " + rateCount);
System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " productReviews.Count: " + "什麼狀況呢");
System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " rateMean: " + rateCount);異步
//——請根據您的業務邏輯來編寫程序(如下代碼僅做參考)——
//獲取支付寶的通知返回參數,可參考技術文檔中服務器異步通知參數列表url
//商戶訂單號orm
string out_trade_no = Request.Form["out_trade_no"];支付寶
var targetUsert = _RegistrationInformationService.GetAllRegistrationInformations().Where(p => p.OrderNumber == out_trade_no).FirstOrDefault();
targetUsert.IsPayed = true;
_RegistrationInformationService.UpdateRegistrationInformation(targetUsert);文檔