文档
测试

3.3支付

POST
payOrder

接口描述

消费订单支付 ,消费卡扣款与手机支付共用此接口;card_no 传入手机支付付款码表示手机支付,传入会员卡号或会员码,表示消费卡扣款

请求参数

参数名
类型
描述
必填
token
String
登录TOKEN
必填
appid
String
商户appid
必填
order_id
Long
订单ID, 下单成功返回的
必填
card_no
String
卡付时:可以为 会员卡号、动态会员码;【特别注意】手机支付时:可以为微信支付或支付宝的付款码
必填

响应参数

参数名
类型
描述
必填
code
int
错误码,成功返回 200,失败返回其它
必填
message
String
错误描述
必填
data
Object
对象,业务数据
必填
saleorder
Object
【作废,不再返回】对象,订单对象,以下是部分重要字段
可选
order_id
Long
订单 ID
必填
totam_amtou
Double
订单金额
必填
sale_date
String
下单时间, 时间格式为 yyyy-MM-dd HH:mm:ss
必填
customer_sn
String
会员卡号
必填
pay_status
int
支付状态:0为未支付,1为已支付,-1已取消
必填
trade_status
int
订单交易状态:0为未付款,1为已完成,-1已退款
必填
update_date
String
订单状态更新时间, 时间格式为 yyyy-MM-dd HH:mm:ss,此处为同支付时间
必填
result_code
String
业务结果码,成功返回 SUCCESS,失败返回其它
必填
result_msg
String
业务结果描述,失败时,返回失败原因或提示
必填
customer
Object
会员对象,卡付时,有返回
可选

说明 / 示例

### 请求示例 ``` https://api2.XXX.cn/cm/payOrder?token=TOKEN&appid=jb25112e65f20e7dfe&card_no=1234&order_id=123 ``` ### 返回示例 #### 成功返回 JSON ``` { "code": 200, "message": "success", "data": { "saleorder": { "order_id": 123, "totam_amout": 50.00, "customer_sn": 1234, "sale_date": "2021-05-15 10:25:05", "trade_status":1, "pay_status": 1, "update_date": "2021-05-15 10:27:05" } } } ``` #### 失败返回 ``` "code": 1502, "message": "business.error.netShopId.isnotExist", "data": "" } ``` ==business.error.netShopId.isnotExist== 商户appid不存在 ``` "code": 8302, "message": "business.error.osaleOrder.notFound", "data": "" } ``` ==business.error.saleOrder.notFound== 订单不存在,一般是订单 ID 错误 ``` "code": 4005, "message": "business.error.customer.notFound", "data": "" } ``` ==business.error.customer.notFound== 会员不存在或已注销,一般是会员序列号错误 消费卡支付失败「错误码」 1. 非支付卡的交易时间 2. 异常卡 3. 余额不足 4. 消费额度超限