Beispiel #1
0
        public string CreateOrder()
        {
            Entity.TradeNewAddInfo order = new Entity.TradeNewAddInfo();

            order.sd_id     = 9;
            order.oid       = Guid.NewGuid().ToString();
            order.user_name = "13888888888";

            order.shipping_name = "zto";

            order.pay_name     = "weixinpay"; //weixinpay
            order.consignee    = "李小姐";
            order.address      = "上海";
            order.zipcode      = "538100";
            order.mobile       = "13888888888";
            order.tel          = "";
            order.email        = "";
            order.postscript   = ""; //买家备注
            order.to_buyer     = ""; //商家备注
            order.goods_amount = "11";
            order.goods_count  = "1";
            order.total_amount = "16";
            order.shipping_fee = "";//快递费
            order.order_amount = "16";
            order.money_paid   = "0";

            order.add_time = DateTime.Now.ToString();

            order.province_name = "广西壮族自治区";
            order.city_name     = "防城港市";
            order.district_name = "东兴市";

            order.orders = new List <Entity.TradeNewAddOrdersInfo>()
            {
                new Entity.TradeNewAddOrdersInfo()
                {
                    outer_sku    = "YC159020TS000",
                    goods_price  = 11,
                    goods_number = 1,
                    goods_name   = "【测试】迷情巴黎时尚休闲连衣裙"
                }
            };

            var resp = GetCommand <Entity.TradeNewAddResp>(string.Format("app_act=efast.trade.new.add&info={0}", JsonConvert.SerializeObject(order)));

            return(JsonConvert.SerializeObject(resp));
        }
Beispiel #2
0
 public Entity.TradeNewAddResp CreateOrder(Entity.TradeNewAddInfo order)
 {
     return(GetCommand <Entity.TradeNewAddResp>(string.Format("app_act=efast.trade.new.add&info={0}", JsonConvert.SerializeObject(order))));
 }