接口说明
用于通知商户订单的实时状态
接口地址
商户在购买商品中设置的notify_url参数,通过POST方式推送到商户指定的接口地址上,参数推送格式:x-www-form-urlencoded,以下JSON格式仅作为参考示例
传入参数
参数名 | 类型 | 必须 | 说明 |
---|---|---|---|
order_id | string | true | 订单编号 |
outer_order_id | string | false | 商户订单号 |
product_id | int | true | 商品编号 |
quantity | int | true | 购买数量 |
state | int | true | 订单状态(100:等待发货,101:正在充值,200:交易成功,500:交易失败,501:未知状态) |
state_info | string | false | 状态信息 |
created_at | datetime | true | 购买数量 |
cards | json | true | 卡密(注意:该字段不加入签名) |
tickets | json | false | 卡券,仅支持base64字符串(注意:该字段不加入签名) |
在收到通知后,请返回字符串"ok",如果不按照规则返回,系统将在10秒后继续通知,累计会通知3次。
示例
{
"quantity" : 1,
"state" : 200,
"state_info" : "",
"timestamp" : 1618280722,
"created_at" : "2021-04-13 02:25:08",
"sign" : "def7f5f1c65ac7d8fbf5b9ffaaaf0dc4",
"order_id" : "749915828461",
"outer_order_id": "20210928134512847783"
"product_id" : 41847,
"customer_id" : 10939,
"cards": [{
"card_no": "vip009",
"card_password": "DDd2kpCxZosyy7d",
"expired_at": "2022-12-31 00:00:00"
}, {
"card_no": "vip010",
"card_password": "UwQ4WnAKfi6wby6",
"expired_at": "2022-12-31 00:00:00"
}, {
"card_no": "vip011",
"card_password": "qKgITDZUuahfmiu",
"expired_at": "2022-12-31 00:00:00"
}],
"tickets": [{
"no": "",
"ticket": "https://oss.cqmeihu.com/alZpSdMXgeI7mGM3vZNLaPZ5y.png",
"expired_at": "2022-12-31 00:00:00"
}, {
"no": "",
"ticket": "https://oss.cqmeihu.com/alZpSdMXgeI7mGM3vZNLaPZ5y.png",
"expired_at": "2022-12-31 00:00:00"
}, {
"no": "",
"ticket": "https://oss.cqmeihu.com/alZpSdMXgeI7mGM3vZNLaPZ5y.png",
"expired_at": "2022-12-31 00:00:00"
}]
}