コード例 #1
0
ファイル: ChinapnrCompany.cs プロジェクト: yhhno/CRL3
 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);
 }
コード例 #2
0
ファイル: ChinapnrCompany.cs プロジェクト: zmk523/CRL3
        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));
        }