public ServiceAmountInfo GetOrderServiceAmount(string token, string orderId) { var postDict = new SortedDictionary <string, object>(); postDict["appAuthToken"] = token; postDict["charset"] = "utf-8"; postDict["timestamp"] = (Helper.ConvertDateTimeInt(DateTime.Now)).ToString(); postDict["orderId"] = orderId; postDict["sign"] = MeituanHelper.Sign(postDict, this.Config.SignKey); StringBuilder url = new StringBuilder("http://api.open.cater.meituan.com/waimai/order/queryById?"); foreach (var item in postDict) { url.Append(item.Key); url.Append('='); url.Append(item.Value); url.Append('&'); } var result = Helper.GetQueryString(url.ToString(), 8000); var jsonObj = (Newtonsoft.Json.Linq.JToken)Newtonsoft.Json.JsonConvert.DeserializeObject(result); var poiReceiveDetail = jsonObj["data"].Value <string>("poiReceiveDetail"); jsonObj = (Newtonsoft.Json.Linq.JToken)Newtonsoft.Json.JsonConvert.DeserializeObject(poiReceiveDetail); var info = new ServiceAmountInfo(); info.PlatformServiceAmount = jsonObj.Value <double>("foodShareFeeChargeByPoi") / 100; info.SettleAmount = jsonObj.Value <double>("wmPoiReceiveCent") / 100; return(info); }
public void OnReceiveOrderSettlement(ResturantPlatformType platformType, string orderId, ServiceAmountInfo serviceAmountInfo) { }
public void OnReceiveOrderSettlement(ResturantPlatformType platformType, string orderId, ServiceAmountInfo settleAmount) { throw new NotImplementedException(); }