简要描述:

  • 接口版本:

版本号 制定人 制定日期 修订日期
1.0.0 kevin 2020-08-03

请求URL:

请求方式:

  • POST

请求头:

参数名 是否必须 类型 说明
token string 授权凭证

请求参数:

参数名 是否必须 类型 说明
module string 显示模块,请查看模块参数
cart_ids string 购物车id,以英文,隔开
pay_method string 支付方式【WeChat=微信 Alipay=支付宝 WZBCurrency=屋装币】
pay_type string 支付端【app=APP端】
username string 联系人
phone string 联系人电话
address string 联系人地址

返回示例:

正确时返回:

微信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": "wx044f6deb55d52eee",
        "partnerid": "1528812791",
        "prepayid": "wx2219154849860961b324b2311946185300",
        "package": "Sign=WXPay",
        "noncestr": "nl447v8yfust2jrkn75q4xndknxlzsn0",
        "timestamp": "1595416548",
        "sign": "CA4BC74BB7854861AAB8B53E0A21D9E4",
        "id": 19
    }
}

微信公众号和小程序返回
{
    "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&notify_url=http%3A%2F%2Fnovel.com%2Fapi%2Fcms%2Fpay%2Fcallback%2FAlipay&sign_type=RSA2&timestamp=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": "参数错误"
}

data返回参数说明:

参数名 类型 说明
id int 订单id

备注:

作者:admin  创建时间:2022-05-14 17:30
 更新时间:2025-04-01 15:40