Skip to main content

四、API返回值

当前API返回的状态码code为0,success为true时代表请求成功,当code=503时代表维护中状态,返回其他状态码均为失败

返回成功
{
"code": 0,
"success": true,
"message": "string",
"data": {
"orderId": "2023102400684344447",
"localUserId": "302199873005",
"localOrderId": "2023102400684344447",
"orderType": "PAYMENT",
"orderBizType": "PAYMENT_WALLET_SCAN",
"paymentUrl": "http://api.wallet.dx.com/scan-pay-front/SAjuzkzzbkfjWewEmCMrTnHdvox1FcgUBcdJ9dSoULwa8Y22hQcQr4szdLkc"
}
}
返回失败示例
{  
    "code": 404,
    "message": "用户不存在",
    "success": false,
    "debug": {
        "message": "org.dxstudio.base.exception.DxNoFoundException: 用户不存在",
        "position": "org.dxstudio.merchant_demo.core.module.order.service.OrderService.createBlankOrder(OrderService.java:49)",
        "application": "dx-merchant-demo"
    }
}
{  
    "code": 2000,
    "message": "金额不能为空",
    "success": false,
    "debug": {
        "message": "org.dxstudio.base.exception.DxBizException: 金额不能为空",
        "position": "org.dxstudio.merchant_demo.core.module.order.service.OrderService.createRecharge1(OrderService.java:82)",
        "application": "dx-merchant-demo"
    }
}