简要描述:
版本号 |
制定人 |
制定日期 |
修订日期 |
1.0.0 |
kevin |
2024-06-05 |
|
请求URL:
请求方式:
请求头:
参数名 |
是否必须 |
类型 |
说明 |
token |
是 |
string |
授权凭证 |
请求参数:
参数名 |
是否必须 |
类型 |
说明 |
id |
是 |
int |
推荐id |
pay_method |
是 |
string |
支付方式 WeChat =微信 , Alipay =支付宝,Apple =苹果 |
pay_type |
是 |
string |
请求类型 app =APP端,public =公众号,small =小程序, pc =电脑端 |
openid |
是 |
string |
openid |
solicit_id |
否 |
string |
征稿ID |
返回示例:
正确时返回:
微信PC返回
{
"status": 200,
"msg": "下单成功",
"data": {
"trade_type": "NATIVE",
"prepay_id": "wx16171731335681e113111c1a1496181100",
"code_url": "weixin://wxpay/bizpayurl?pr=X7FRFSA",
"id": 3
}
}
微信app返回
{
"status": 200,
"msg": "下单成功",
"data": {
"appid": "wxd65a13300ecaae03",
"partnerid": "1523813651",
"prepayid": "wx161732432619417cecdddb281408771500",
"package": "Sign=WXPay",
"noncestr": "0q3tbj1vng45o5cz6zkekqk75zv5aje4",
"timestamp": "1584351160",
"sign": "3551BE0FE3A02C943F8604514579377A",
"id": 5
}
}
微信公众号和小程序返回
{
"status": 200,
"msg": "下单成功",
"data": {
"appId": "wx04b986123b240a1f",
"timeStamp": "1584354029",
"nonceStr": "3jonkamsjdumexkmlvkuw89m3x7kwsr5",
"package": "prepay_id=wx16182032520208fbc2e829f31117311600",
"signType": "MD5",
"paySign": "A35330D466BB3810B26A01DB5BB99E6C",
"id": 14
}
}
支付宝APP返回
{
"status": 200,
"msg": "下单成功",
"data": {
"result": "alipay_sdk=alipay-sdk-php-easyalipay-20190926&app_id=2019121169879357&biz_content=%7B%22body%22%3A%22%E5%9C%A8%E7%BA%BF%E6%94%AF%E4%BB%98%22%2C%22subject%22%3A+%22%E5%9C%A8%E7%BA%BF%E6%94%AF%E4%BB%98%22%2C%22out_trade_no%22%3A+%2220031618222965497462%22%2C%22timeout_express%22%3A+%2260m%22%2C%22total_amount%22%3A+%220.01%22%2C%22product_code%22%3A%22QUICK_MSECURITY_PAY%22%7D&charset=UTF-8&format=json&method=alipay.trade.app.pay¬ify_url=http%3A%2F%2Fnovel.com%2Fapi%2Fcms%2Fpay%2Fcallback%2FAlipay&sign_type=RSA2×tamp=2020-03-16+18%3A22%3A29&version=1.0&sign=S7Ti7U7R6MQejp8t9HNhhohY%2FptL4y22XruNbapi7WDgS1RbrYqyJrLIUdbr4MPpcM86Z2L184wL41%2FYYy9NJV4MD8hg%2FQtW2CpezwxJcBDv%2BX%2FkaE%2BJca2Dz2YHjC9yDCZHLCd%2BUZvnzI%2Fba6EaJjrmxtVqlk4qrrY4WRPA0saGes75XFv%2BkH8zaPeTAfHDynLw8VKqBru835lVhP5cwiNv4UUKdvolne4CbN0sznAKuDfJxiibcCi0yfm4g4GOBrIPJKKMUAZch2GPL0paTgm8%2FqfYXcWrCm4%2F8nv3qekNpjfEuF1sjXCY7neuWvOtcdTBpPoniMg%2B6N0qxGK1uA%3D%3D",
"id": 15
}
}
错误时返回:
{
"status": 0,
"msg": "提交失败"
}
返回参数说明:
备注:
文档更新时间: 2024-06-06 08:15 作者:admin