public override Task <QueryReturn> OrderQuery(string OrderNumber) { QueryReturn queryReturn = new QueryReturn(); IDictionary <string, string> dic = new SortedDictionary <string, string>(); dic.Add("rid", this.MchID); dic.Add("order_sn", OrderNumber); string response = HttpHelper.PostJosn(this.Plat.Req_gateway, JsonConvert.SerializeObject(dic)); dynamic m = JsonConvert.DeserializeObject(response); string errno = m["errno"]; string msg = m["msg"]; if (errno == "0") { queryReturn.ReturnMsg = "支付成功"; queryReturn.Attach = queryReturn.ReturnMsg; queryReturn.OrderNumber = OrderNumber; queryReturn.SerialNumber = OrderNumber; decimal amount = m["data"]["money"]; queryReturn.Totalfee = amount / 1m; queryReturn.IsPay = true; } else { queryReturn.ReturnMsg = "未支付"; queryReturn.Attach = queryReturn.ReturnMsg; queryReturn.OrderNumber = OrderNumber; queryReturn.SerialNumber = OrderNumber; decimal amount = m["data"]["money"]; queryReturn.Totalfee = amount / 1m; queryReturn.IsPay = false; } return(new Task <QueryReturn>(() => queryReturn)); }
public override Task <QueryReturn> OrderQuery(string OrderNumber) { QueryReturn queryReturn = new QueryReturn(); return(new Task <QueryReturn>(() => queryReturn)); }