protected override string OnNotify(System.Web.HttpContext context) { context.Request.ContentEncoding = encode; var c = context.Request.Form; var fields = typeof(ChargeResponse).GetFields(); var obj = new ChargeResponse(); foreach (var item in fields) { item.SetValue(obj, c[item.Name]); } if (!obj.CheckSign(obj.ChkValue)) { return "签名不正确"; } if (obj.RespCode == "000000") { PayHistory order = OnlinePayBusiness.Instance.GetOrder(obj.OrdId, ThisCompanyType); Confirm(order, GetType(), Convert.ToDecimal(obj.OrdAmt)); return string.Format("RECV_ORD_ID_{0}", obj.OrdId); } return string.Format("失败 {0}", obj.RespCode); }
protected override string OnNotify(System.Web.HttpContext context) { context.Request.ContentEncoding = encode; var c = context.Request.Form; var fields = typeof(ChargeResponse).GetFields(); var obj = new ChargeResponse(); foreach (var item in fields) { item.SetValue(obj, c[item.Name]); } if (!obj.CheckSign(obj.ChkValue)) { return("签名不正确"); } if (obj.RespCode == "000000") { PayHistory order = OnlinePayBusiness.Instance.GetOrder(obj.OrdId, ThisCompanyType); Confirm(order, GetType(), Convert.ToDecimal(obj.OrdAmt)); return(string.Format("RECV_ORD_ID_{0}", obj.OrdId)); } return(string.Format("失败 {0}", obj.RespCode)); }