method=waitpay.trade.list (待支付订单列表接口)
第三方待支付订单列表
请求参数:
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
udid | String | 是 | ipad唯一标志 |
请求示例
api-test1.yohops.com:9999/gateway?method=waitpay.trade.list&udid=maelk&debug=XYZ
响应成功JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": [
{
"buttonDesc": "结账",
"cancelShowTime": 0,//取消之后展示的时间
"createTime": "1487655109",
"goods": [
{
"goodsName": "双拼双色奶茶",
"num": 4,
"price": "25.0"
}
],
"num": 4,
"outerOrderNo": "YH123456789",//第三方订单号
"tradeOrderNo":"123456789",//有货订单
"payLeftTime": "0",//支付剩余时间
"status": 0,//0预创建 1已创建未付款 2已取消
"totalAmount": "100.01"
}
],
"md5": "6ff3bcff29d59d7336652a4f419567f5",
"message": "wait pay third order list"
}
或者
{
"alg": "SALT_MD5",
"code": 200,
"data": [
{
"buttonDesc": "结账",
"cancelShowTime": 0,//取消之后展示的时间
"createTime": "1488964521",
"goods": [
{
"goodsName": "ice-tea1989",
"num": 2,
"price": "20.0"
},
{
"goodsName": "ice-tea1988",
"num": 2,
"price": "30.0"
}
],
"num": 4,
"outerOrderNo": "yoho12345679",
"payLeftTime": "0",
"status": 0,
"totalAmount": "100.0"
},
{
"buttonDesc": "结账",
"cancelShowTime": 0,
"createTime": "1488964521",
"goods": [
{
"goodsName": "ice-tea1989",
"num": 2,
"price": "20.0"
},
{
"goodsName": "ice-tea1988",
"num": 2,
"price": "30.0"
}
],
"num": 4,
"outerOrderNo": "yoho12345680",
"payLeftTime": "0",
"status": 0,
"totalAmount": "100.0"
},
{
"buttonDesc": "结账",
"cancelShowTime": 0,
"createTime": "1488964521",
"goods": [
{
"goodsName": "ice-tea1989",
"num": 2,
"price": "20.0"
},
{
"goodsName": "ice-tea1988",
"num": 2,
"price": "30.0"
}
],
"num": 4,
"outerOrderNo": "yoho12345681",
"payLeftTime": "0",
"status": 0,
"totalAmount": "100.0"
}
],
"md5": "58e97809d37cd33b33a8d8700639844a",
"message": "wait pay third order list"
}
waitpay.trade.count (待支付订单数目)
请求参数:
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
udid | String | 是 | ipad唯一标志 |
请求示例
api-test1.yohops.com:9999/gateway?method=waitpay.trade.count&udid=maelk&debug=XYZ
响应成功JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"count": 3
},
"md5": "31febc88d91b48efdfae9e72e9057910",
"message": "count wait pay third order"
}
third.push.list (推送列表)
请求参数:
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
---|---|---|---|---|---|
udid | String | 是 | ipad唯一标志 |
请求示例
api-test1.yohops.com:9999/gateway?method=third.push.list&udid=maelk&debug=XYZ
响应成功JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": [],
"md5": "6d729d4b35f10fc73531210bd7ecff91",
"message": "third offline push list"
}
或者:
{
"alg": "SALT_MD5",
"code": 200,
"data": [
{
"outerOrderNo": "yoho12345679",
"tradeNo": "488962704970747",
"tradeStatus": "PRE_CREATE"
}
],
"md5": "461d3f3a40c17f33b61f59f3d5dfca03",
"message": "third offline push list"
}
third.trade.compute (结算接口)
请求参数
参数 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
outerOrderNo | String | 必填 | 商户订单号 | YH123456789 |
type | int | 必填 | 交易类别 1店员购买2用户自行购买 | 1 |
uid | String | 必填 | 用户id | 8041876 |
useYohocoin | boolean | 必填 | 是否使用有货币 | false |
请求示例
api-test1.yohops.com:9999/gateway?method=third.trade.compute&debug=XYZ&outerOrderNo=yoho12345681&type=1&uid=8041876&useYohocoin=true
响应成功JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"counponNum": 0,
"list": [
{
"goodsName": "ice-tea1989",
"num": 2,
"price": "20.0"
},
{
"goodsName": "ice-tea1988",
"num": 2,
"price": "30.0"
}
],
"payAmount": "100.0",
"promotionInfo": [
{
"amountValue": "100.0",
"desc": "商品金额"
}
],
"totalNum": 4,
"yohocoin": 0,
"yohocoinStr": "0"
},
"md5": "4a07c3810f7ce4a3c58243681d4e6201",
"message": "compute third offline order"
}
method=third.trade.submit (提交订单)
请求参数
参数 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
tradeNo | String | 必填 | 有货订单号 | 123456789 |
outerTradeNo | String | 必填 | 商户订单号 | YH123456789 |
totalAmount | double | 必填 | 总金额 | 100 |
disCountableAmount | double | 不必填 | 折扣金额 | 0 |
buyerPayAmount | double | 必填 | 用户实际支付金额 | 100.00 |
yohocoinAmount | double | 必填 | 有货币支付金额 | 0.00 |
yohocoinNum | int | 必填 | 有货币使用数量 | 0 |
uid | String | 必填 | 用户id | 8041876 |
udid | String | 是 | ipad唯一标志 |
请求示例
api-test1.yohops.com:9999/gateway?method=third.trade.submit&debug=XYZ&udid=maelk&tradeNo=488962704970749&outerTradeNo=yoho12345681&totalAmount=100.00&disCountableAmount=0&buyerPayAmount=100&yohocoinAmount=0&yohocoinNum=0&uid=8041876
响应成功JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"outerNo": "yoho12345681",
"payAmount": 100,
"tradeNo": "488962704970749",
"tradeStatus": "WAIT_BUYER_PAY"
},
"md5": "71577987c8fd948a997d689ed4dfca14",
"message": "submit third offline order success"
}
third.trade.cancel (取消订单)
请求参数
参数 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
outerTradeNo | String | 必填 | 商户订单号 | YH123456789 |
请求示例
localhost:8080/gateway?method=third.trade.cancel&debug=XYZ&outerOrderNo=YH123456789
响应成功JSON格式如下所示:
{
"alg": "SALT_MD5",
"code": 200,
"data": [],
"md5": "6d729d4b35f10fc73531210bd7ecff91",
"message": "cancel third order success"
}