提交订单参数名为:order_data

请求URL:

POST:一级域名/index.php?s=/wapapi/Order/orderCreateOld

—————————————————————————————————————————————————

提交数据结构:

{
order_data:{
	"shipping": {
		"57": {						//商品ID
			"shipping_fee": "2",	//邮费
			"total_num": "1"		//商品数量
		},
		"58": {
			"shipping_fee": "4",
			"total_num": "1"
		},
		"59": {
			"shipping_fee": "8",
			"total_num": "1"
		},
		"61": {
			"shipping_fee": "12",
			"total_num": "2"
		}
	},
	"order": {
		"0": {
			"sku": {					
				"64": {					//规格ID
					"sku_id": "64",		//sku_id 规格ID
					"goods_id": "57",	//商品ID
					"goods_name": "test",		//商品名称
					"seckill_id": "41",		//秒杀活动id
					"price": "100",		//价格
					"member_price": "90",	//会员价格
					"discount_price": "81",	//折扣价格
					"num": "1",				//数量
					"sku_amount": "100",	//规格总数
					"discount_id": "20",	//限时折扣ID
					"promotion_shop_id": "0",	//店铺ID
					"shop_id": "0",			//店铺ID
					"shipping_fee": "2"		//邮费
				},
				"67": {
					"sku_id": "67",
					"goods_id": "58",
					"goods_name": "test2",		//商品名称
					"seckill_id": "41",
					"price": "1",
					"member_price": "0.9",
					"discount_price": "0.81",
					"num": "1",
					"sku_amount": "1",
					"discount_id": "20",
					"promotion_shop_id": "0",
					"shop_id": "0",
					"shipping_fee": "4"
				},
				"68": {
					"sku_id": "68",
					"goods_id": "59",
					"goods_name": "test3",		//商品名称
					"seckill_id": "41",
					"price": "1",
					"member_price": "0.9",
					"discount_price": "0.81",
					"num": "1",
					"sku_amount": "1",
					"discount_id": "20",
					"promotion_shop_id": "0",
					"shop_id": "0",
					"shipping_fee": "8"
				}
			}
		},
		"52": {				
			"sku": {
				"70": {		
					"sku_id": "70",
					"goods_id": "61",
					"goods_name": "test4",		//商品名称
					"seckill_id": "0",
					"price": "100",
					"member_price": "90",
					"discount_price": "90",
					"num": "1",
					"sku_amount": "100",
					"discount_id": "",
					"promotion_shop_id": "",
					"shop_id": "52",
					"shipping_fee": "6",	
					"promotion_id": "19",	
					"full_cut_sku_percent": "0.5",	 //满送优惠占比
					"full_cut_sku_amount": "10",	 //优惠金额
					"full_cut_shop_id": "0"
				},
				"71": {
					"sku_id": "71",
					"goods_id": "61",
					"goods_name": "test5",		//商品名称
					"seckill_id": "0",
					"price": "100",
					"member_price": "90",
					"discount_price": "90",
					"num": "1",
					"sku_amount": "100",
					"discount_id": "",
					"promotion_shop_id": "",
					"shop_id": "52",
					"shipping_fee": "6",
					"promotion_id": "19",
					"full_cut_sku_percent": "0.5",
					"full_cut_sku_amount": "10",
					"full_cut_shop_id": "0"
				}
			}
		}
	},
	"promotion": { 		//优惠信息  有则填写,无则不填
		"52": {				//店铺ID
			"man_song": {	//满送信息
				"32": {
					"full_cut": {
						"man_song_id": "19",   
						"rule_id": "32",	  //规则ID
						"discount": "10",     //优惠金额
						"price": "100",       //需要金额
						"goods_limit": [""],
						"shop_id": "0"
					}
				}
			},
			"coupon": {		//优惠券信息
					"coupon_id": "19",
					"coupon_genre": 1,   //优惠券类型,1-无门槛,2-满减,3-折扣
					"coupon_reduction_amount":"10",   //优惠券优惠金额  无门槛
					"money": "100",    //优惠券优惠金额  满减
					"discount": "5",    //优惠券优惠金额  折扣
					"at_least": "100"    //最少满多少
			}
		}
	},
	"shop": {
		"0": {
			"goods_id_array": ["59", "58", "57"],    //商品ID
			"member_amount": "91.8",		//会员折扣
			"shipping_fee": "14",			//邮费
			"promotion_free_shipping": "0",	 //活动是否免邮 1:免邮
			"shop_total_amount": "102",		//店铺总金额
			"discount_amount": "82.62",		//打折之后的店铺商品总金额,用于后台验证是否满足满减
			"shop_should_paid_amount": "96.62",  //店铺应支付金额
			"shop_promotion_reduction_amount": "9.18",   //店铺商品优惠总金额
			"leave_message": ""				//店铺留言
		},
		"52": {
			"goods_id_array": ["61", "61"],
			"member_amount": "180",
			"shipping_fee": "12",
			"promotion_free_shipping": "0",
			"shop_total_amount": "200",
			"discount_amount": "180",
			"man_song_coupon_type_id": "0",    //满送优惠券ID
			"man_song_point": "0",			   //优惠百分比
			"man_song_amount": "10",		   //优惠金额
			"man_song_shop_id": "0",
			"shop_should_paid_amount": "182",  
			"shop_promotion_reduction_amount": "10",
			"leave_message": ""    
		}
	},
	"address_id": "1",
	"record_id": "1",//参与哪个团购id
	"group_id": "1",//团购活动id
	"custom_order": "",//自定义表单数据
	"total_pay_amount": "278.62",   //支付总金额
}
}

返回示例:

成功时返回:

{
    "code": 0,
    "message": "提交成功"
	"data": {
			"out_trade_no": 123456789,
			//外部订单号,用于支付
		}
	},
}

错误时返回:

{
    "code": -1,
    "message": "订单提交失败"
}