private void setGetOrderParams(string bussdata) { AliOrder order = JsonConvert.DeserializeObject <AliOrder>(bussdata); Secret = order; UrlParams = new Dictionary <string, string>(); UrlParams.Add("access_token", Secret.TokenKey); UrlParams.Add("orderId", order.OrderId); FunName = "cn.alibaba.open/trade.order.orderDetail.get"; }
private void setCreateOrderPaymentParams(string bussdata) { AliOrder order = JsonConvert.DeserializeObject <AliOrder>(bussdata); Secret = order; UrlParams = new Dictionary <string, string>(); UrlParams.Add("access_token", Secret.TokenKey); UrlParams.Add("orderId", order.OrderId); FunName = "com.alibaba.trade/alibaba.payment.order.bank.create"; }
/// <summary> /// 取消订单 /// </summary> /// <param name="bussdata"></param> private void setCancelOrderParams(string bussdata) { AliOrder order = JsonConvert.DeserializeObject <AliOrder>(bussdata); Secret = order; UrlParams = new Dictionary <string, string>(); UrlParams.Add("access_token", Secret.TokenKey); UrlParams.Add("webSite", "1688"); UrlParams.Add("tradeID", order.OrderId); UrlParams.Add("cancelReason", order.cancelReason); UrlParams.Add("remark", order.remark); FunName = "com.alibaba.trade/alibaba.trade.cancel"; }
private void setGetOrder2Params(string bussdata) { AliOrder order = JsonConvert.DeserializeObject <AliOrder>(bussdata); Secret = order; UrlParams = new Dictionary <string, string>(); UrlParams.Add("access_token", Secret.TokenKey); UrlParams.Add("id", order.OrderId); UrlParams.Add("needInvoiceInfo", "false"); UrlParams.Add("needOrderMemoList", "false"); UrlParams.Add("needLogisticsOrderList", "false"); UrlParams.Add("needOrderEntries", "true"); FunName = "cn.alibaba.open/trade.order.detail.get"; }
private void setCreateOrderParams(string bussdata) { AliOrder order = JsonConvert.DeserializeObject <AliOrder>(bussdata); Secret = order; UrlParams = new Dictionary <string, string>(); UrlParams.Add("access_token", Secret.TokenKey); UrlParams.Add("subBiz", order.SubBiz); JObject obj = new JObject(); obj.Add("supplyNoteId", order.SupplyNoteId); if (order.AliOrderDetails != null) { if (order.AliOrderDetails.Count > 0) { JArray ids = new JArray(); JArray details = new JArray(); JObject itemobj; foreach (AliOrderDetail item in order.AliOrderDetails) { itemobj = new JObject(); itemobj.Add("quoteItemId", item.QuoteItemId); itemobj.Add("itemCount", item.ItemCount); ids.Add(item.QuoteItemId); details.Add(itemobj); } obj.Add("quoteItemIds", ids); obj.Add("skuAmountList", details); } } UrlParams.Add("quotationInfo", JsonConvert.SerializeObject(obj)); obj = new JObject(); obj.Add("receiveAddressGroup", JsonConvert.DeserializeObject <JObject>(JsonConvert.SerializeObject(order.ReceiveAddressGroup))); UrlParams.Add("makeSingleOrderGroup", JsonConvert.SerializeObject(obj)); FunName = "com.alibaba.trade/alibaba.trade.quotationOrder.create"; }