立即购买-第二步
发生场景: 点击"立即购买"后的填写订单页面, 计算价格/提交订单
URL地址 | http://www.tpbbc2_0.com/index.php?m=Api&c=cart&a=cart3 |
请求方式 | post |
参数列表
参数 | 是否必须 | 说明 |
goods_id | 必选 | 商品ID |
item_id | 必选 | 规格组合ID |
goods_num | 必选 | 购买数量 |
action | 必选 | 固定值:"buy_now" |
act | 必选 | order_price 为价格变动submit_order为提交订单 |
address_id | 必选 | 用户选择的收货地址id |
cart_from_data | 必填 | 此参数格式参考"购物车订单填写以及提交"接口 |
示例
成功示例 { "status": 1, "msg": "计算成功", "result": { "postFee": 0, "couponFee": 0, "balance": 0, "pointsFee": 0, "payables": "50.00", "goodsFee": 50, "order_prom_amount": 0, "store_order_prom_id": { "2": 0 }, "store_order_prom_amount": { "2": 0 }, "store_order_prom_money": null, "store_order_amount": { "2": 50 }, "store_shipping_price": { "2": 0 }, "store_coupon_price": null, "store_point_count": null, "store_balance": null, "store_goods_price": { "2": 50 }, "store_order_prom_title": { "2": null }, "goods_shipping": { "403": { "status": 1, "msg": "可配送", "result": [ { "shipping_area_id": 45, "shipping_area_name": "全国其他地区", "shipping_code": "shentong", "config":"a:4:{s:12:\"first_weight\";s:4:\"1000\";s:5:\"money\";s:2:\"12\";s:13:\"second_weight\";s:4:\"2000\";s:9:\"add_money\";s:1:\"2\";}", "update_time":1508902474, "is_default":1, "is_close":1, "store_id":2, "freight": 0, "shipping_name": "申通物流" }, { "shipping_area_id": 2, "shipping_area_name": "全国其他地区", "shipping_code": "shunfeng", "config":"a:4:{s:12:\"first_weight\";s:4:\"1000\";s:5:\"money\";s:2:\"15\";s:13:\"second_weight\";s:4:\"2000\";s:9:\"add_money\";s:1:\"2\";}", "update_time": 1499841623, "is_default":1, "is_close":1, "store_id":2, "freight": 0, "shipping_name": "顺丰物流" } ] } } } } 失败示例 { "status": 1, "msg": "请求方式错误", "result": "" }