多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 确认订单 ### 订单接口分为 确认实物订单,确认虚拟订单,确认门店自提订单 和 确认分销一键代发商品订单 1. 确认实物订单 ### +++ get:[http://url/index.php?ctl=Buyer\_Cart&met=addOrder&typ=json](http://url/index.php?ctl=Buyer_Cart&met=addOrder&typ=json) \*product\_id=购物车ID#多个ID用英文半角逗号隔开 \*int:cart\_type=购物车类型#1积分购物车,0普通购物车 \*int:address\_id=收货地址ID# <<< success 成功: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"200"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> 略 <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"success"</span> ``` ``` } 失败: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"250"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"failure"</span> ``` ``` } +++ 2. 确认虚拟订单 ### +++ get:[http://url/index.php?ctl=Buyer\_Cart&met=confirmVirtual&typ=json](http://url/index.php?ctl=Buyer_Cart&met=confirmVirtual&typ=json) \*goods\_id=商品ID# \*nums=商品数量 # <<< success 成功: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"200"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> 略 <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"success"</span> ``` ``` } 失败: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"250"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"failure"</span> ``` ``` } +++ 3. 确认门店自提订单 ### +++ get:[http://url/index.php?ctl=Buyer\_Cart&met=confirmChain&typ=json](http://url/index.php?ctl=Buyer_Cart&met=confirmChain&typ=json) \*int:chain\_id=门店ID# \*int:goods\_id=商品ID # <<< success 成功: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"200"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> 略 <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"success"</span> ``` ``` } 失败: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"250"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"failure"</span> ``` ``` } +++ 4. 确认分销一件代发商品订单 ### +++ get:[http://url/index.php?ctl=Buyer\_Cart&met=confirmGoods&typ=json](http://url/index.php?ctl=Buyer_Cart&met=confirmGoods&typ=json) \*int:goods\_id=商品ID# \*int:goods\_num=商品数量# \*int:address\_id=收货地址ID# <<< success 成功: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"200"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> <span class="token4">"common"</span><span class="token1">:</span><span class="token1">{</span> 略 <span class="token1">}</span><span class="token1">,</span> <span class="token4">"base"</span><span class="token1">:</span><span class="token1">{</span> 略 <span class="token1">}</span><span class="token1">,</span> <span class="token4">"transport"</span><span class="token1">:</span><span class="token1">{</span> 略 <span class="token1">}</span><span class="token1">,</span> <span class="token4">"shop"</span><span class="token1">:</span><span class="token1">{</span> 略 <span class="token1">}</span><span class="token1">,</span> <span class="token4">"token"</span><span class="token1">:</span><span class="token4">"加密字符串,提交订单时使用"</span> <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"success"</span> ``` ``` } 失败: { ``` <pre class="calibre14">``` <span class="token4">"status"</span><span class="token1">:</span> <span class="token4">"250"</span><span class="token1">,</span> <span class="token4">"data"</span><span class="token1">:</span> <span class="token1">{</span> <span class="token1">}</span>, <span class="token4">"msg"</span><span class="token1">:</span><span class="token4">"商品已下架或库存不足"</span> ``` ``` } +++