4- 4. Request API return value
The current status code code returned by the API is 0. When success is true, it means the request is successful. When code=503, it means the status is under maintenance. Returning other status codes means failure.
Return Success
{
"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"
}
}
Return failure example
{
"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"
}
}