Beispiel #1
0
        public static ChargeNotify FromRequest(System.Collections.Specialized.NameValueCollection c)
        {
            var fields = typeof(ChargeNotify).GetProperties();
            var obj    = new ChargeNotify();

            foreach (var item in fields)
            {
                item.SetValue(obj, c[item.Name], null);
            }
            return(obj);
        }
Beispiel #2
0
        protected override string OnNotify(HttpContext context)
        {
            var    response = ChargeNotify.FromRequest(context.Request.QueryString);
            var    a        = response.CheckSign();
            int    result   = 1;
            string msg1     = "error";

            if (a && response.payResult == "10")
            {
                PayHistory order = OnlinePayBusiness.Instance.GetOrder(response.orderId, ThisCompanyType);
                Confirm(order, GetType(), Convert.ToDecimal(response.payAmount) / 100);
                result = 1;
                msg1   = "success";
            }
            return("<result>" + result + "</result><redirecturl>" + return_url + "?msg=" + msg1 + "</redirecturl>");
        }
Beispiel #3
0
 public static ChargeNotify FromRequest(System.Collections.Specialized.NameValueCollection c)
 {
     var fields = typeof(ChargeNotify).GetProperties();
     var obj = new ChargeNotify();
     foreach (var item in fields)
     {
         item.SetValue(obj, c[item.Name], null);
     }
     return obj;
 }