3.5烈熊收银台接口(购买权益卡)
<p>路径:/api/order/createOrder</p>
<p>方法: POST</p>
<p>header:</p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>长度限制</th>
<th>是否必填</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>Authorization</td>
<td>String</td>
<td></td>
<td>是</td>
<td>Bearer 客户认证令牌/会员认证令牌</td>
</tr>
</tbody>
</table>
<p>请求参数:</p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>类型</th>
<th>长度限制</th>
<th>是否必填</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>thirdOrderNo</td>
<td>String</td>
<td></td>
<td>是</td>
<td>第三方订单号</td>
</tr>
<tr>
<td>goodsItem</td>
<td>Array</td>
<td></td>
<td>是</td>
<td>商品组以Array形式传入</td>
</tr>
<tr>
<td>goodsItem.salesDetailId</td>
<td>String</td>
<td></td>
<td>是</td>
<td>购卡详情id</td>
</tr>
<tr>
<td>goodsItem.buyNum</td>
<td>int</td>
<td></td>
<td>是</td>
<td>购卡数量</td>
</tr>
<tr>
<td>goodsItem.buyPrice</td>
<td>int</td>
<td></td>
<td>是</td>
<td>购卡金额单位(分)</td>
</tr>
<tr>
<td>goodsItem.onTime</td>
<td>String</td>
<td></td>
<td>是</td>
<td>开通时间格式:yyyy-MM-dd HH:mm:ss</td>
</tr>
<tr>
<td>thirdAttach</td>
<td>String</td>
<td></td>
<td>否</td>
<td>客户自定义参数,推送时返回</td>
</tr>
<tr>
<td>notifyUrl</td>
<td>String</td>
<td></td>
<td>是</td>
<td>订单状态推送通知地址</td>
</tr>
<tr>
<td>payType</td>
<td>String</td>
<td></td>
<td>否</td>
<td>支付类型</td>
</tr>
<tr>
<td>successReturnUrl</td>
<td>String</td>
<td></td>
<td>否</td>
<td>支付成功跳转页面successReturnUrl和failReturnUrl须同时传入</td>
</tr>
<tr>
<td>failReturnUrl</td>
<td>String</td>
<td></td>
<td>否</td>
<td>支付失败跳转页面successReturnUrl和failReturnUrl须同时传入</td>
</tr>
</tbody>
</table>
<pre><code class="language-json">{
"thirdOrderNo": "xmytest20221107087989",
"successReturnUrl": "http://139.196.203.17:18080/notify",
//支付成功跳转页面
"failReturnUrl": "http://139.196.203.17:18080/notify",
//支付失败跳转页面
"thirdAttach": "xmytest",
"payType": "",
"notifyUrl": "https://push.liexiong.net/push/下单权益卡",
"goodsItem":[
{
"salesDetailId":"{{salesDetailId}}",
"buyNum":1,
"buyPrice":"1",
"onTime":"2022-11-07 01:20:19"
}
]
}</code></pre>
<p>返回:</p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>类型</th>
<th>长度限制</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>orderNo</td>
<td>String</td>
<td></td>
<td>烈熊订单号</td>
</tr>
<tr>
<td>thirdOrderNo</td>
<td></td>
<td></td>
<td>第三方订单号</td>
</tr>
<tr>
<td>goodsItem</td>
<td>Array</td>
<td></td>
<td>商品信息</td>
</tr>
<tr>
<td>goodsItem.salesDetailId</td>
<td>String</td>
<td></td>
<td>商品ID</td>
</tr>
<tr>
<td>goodsItem.userCardInfo</td>
<td>Array</td>
<td></td>
<td>用户权益卡信息</td>
</tr>
<tr>
<td>goodsItem.userCardInfo.userCardId</td>
<td>String</td>
<td></td>
<td>用户权益卡id</td>
</tr>
<tr>
<td>goodsItem.userCardInfo.startTime</td>
<td>String</td>
<td></td>
<td>用户权益卡生效时间</td>
</tr>
<tr>
<td>goodsItem.userCardInfo.startTime</td>
<td>String</td>
<td></td>
<td>用户权益卡失效时间</td>
</tr>
</tbody>
</table>
<pre><code class="language-json">{
"code": "0",
"data": {
"cashierUrl": "https://interests-m-prev.billbear.vip/cashier/?customerId=1402914735558414337&memberId=1589812189468639234&payOrderId=1589813267058184193&token=OPEN_MEMBER.bed853a691eb4b7e88a229bd253453be.6372fe19&tradeType=H5&sceneId=INTERESTS_CARD&payType=&success=http://139.196.203.17:18080/notify&fail=http://139.196.203.17:18080/notify&index=https://interests-m-prev.billbear.vip/ecard/pages/mineequitycard/index",
"orderNo": "202211081053148161122"
},
"message": "请求成功",
"service": "",
"success": true
}</code></pre>
<p>错误:</p>
<table>
<thead>
<tr>
<th style="text-align: left;">codes</th>
<th style="text-align: left;">问题描述</th>
<th style="text-align: left;">解决</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">401</td>
<td style="text-align: left;">Bearer令牌不允许为空/token无效</td>
<td style="text-align: left;">请检查Authorization参数</td>
</tr>
<tr>
<td style="text-align: left;">INTERESTS_10055</td>
<td style="text-align: left;">三方订单号不可重复下单</td>
</tr>
<tr>
<td style="text-align: left;">400</td>
<td style="text-align: left;">缺少参数</td>
<td style="text-align: left;">具体内容查阅返回的message字段</td>
</tr>
</tbody>
</table>
<p>加入权益卡订单状态处理结果通知
注 · 当 notifyUrl 推送url参数不为空时,系统将按照下列格式像目标URL以body体json格式进行数据推送
三方接收到推送消息后,需给烈熊返回标识 success 表示成功接收到数据,就算本次推送完成
推送参数:</p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>类型</th>
<th>长度限制</th>
<th>是否必填</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>orderNo</td>
<td>String</td>
<td>32</td>
<td>是</td>
<td>烈熊订单编号</td>
</tr>
<tr>
<td>thirdOrderNo</td>
<td>String</td>
<td>32</td>
<td>是</td>
<td>第三方订单编号</td>
</tr>
<tr>
<td>thirdUserId</td>
<td>String</td>
<td>32</td>
<td>是</td>
<td>第三方用户唯一标识</td>
</tr>
<tr>
<td>orderState</td>
<td>String</td>
<td>32</td>
<td>是</td>
<td>订单状态TO_PAY 待付款,COMPLETE 完成,CANCEL 取消,CLOSE 关闭(退款)</td>
</tr>
<tr>
<td>orderTime</td>
<td>String</td>
<td></td>
<td>是</td>
<td>烈熊订单创建时间</td>
</tr>
<tr>
<td>thirdAttach</td>
<td>String</td>
<td></td>
<td>否</td>
<td>如接口请求时有携带该参数,则会原样返回</td>
</tr>
<tr>
<td>goodsItem</td>
<td>Array</td>
<td></td>
<td>是</td>
<td>商品组以Array形式传入</td>
</tr>
<tr>
<td>goodsItem.salesDetailId</td>
<td>String</td>
<td></td>
<td>是</td>
<td>售卡详情id</td>
</tr>
<tr>
<td>goodsItem.buyNum</td>
<td>int</td>
<td></td>
<td>是</td>
<td>购卡数量,当前仅支持1</td>
</tr>
<tr>
<td>goodsItem.buyPrice</td>
<td>int</td>
<td></td>
<td>是</td>
<td>购卡金额,单位分</td>
</tr>
<tr>
<td>goodsItem.userCardInfo</td>
<td>Array</td>
<td></td>
<td>是</td>
<td>用户权益卡信息</td>
</tr>
<tr>
<td>goodsItem.userCardInfo.startTime</td>
<td>String</td>
<td></td>
<td>是</td>
<td>权益卡生效时间,yyyy-MM-dd HH:mm:ss</td>
</tr>
<tr>
<td>goodsItem.userCardInfo.endTime</td>
<td>String</td>
<td></td>
<td>是</td>
<td>权益卡失效时间,yyyy-MM-dd HH:mm:ss</td>
</tr>
</tbody>
</table>