public void Delivering(DeliverParameter parameter) { var param = new Dictionary <string, object>(); param["orderId"] = parameter.OrderID; var jsonObj = Post(parameter.Token, "eleme.order.deliveryBySelfLite", param); }
public void Delivering(DeliverParameter parameter) { var postDict = new SortedDictionary <string, object>(); postDict["appAuthToken"] = parameter.Token; postDict["charset"] = "utf-8"; postDict["timestamp"] = (Helper.ConvertDateTimeInt(DateTime.Now)).ToString(); postDict["orderId"] = parameter.OrderID; postDict["courierName"] = parameter.CourierName; postDict["courierPhone"] = parameter.CourierPhone; postDict["sign"] = MeituanHelper.Sign(postDict, this.Config.SignKey); var result = Helper.PostQueryString("http://api.open.cater.meituan.com/waimai/order/delivering", postDict, 8000); var jsonObj = (Newtonsoft.Json.Linq.JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(result); Newtonsoft.Json.Linq.JToken errobj; if (jsonObj.TryGetValue("error", StringComparison.CurrentCultureIgnoreCase, out errobj)) { throw new Exception(errobj.Value <string>("message")); } if (!string.Equals(jsonObj.Value <string>("data"), "ok", StringComparison.CurrentCultureIgnoreCase)) { throw new Exception("发生错误"); } }
public void Delivering(DeliverParameter parameter) { throw new NotImplementedException(); }