| | |
| | | /** BSPAY 配置字典 type */ |
| | | private static final String DICT_TYPE = "BSPAY_CONFIG"; |
| | | /** BSPAY 下单接口路径 */ |
| | | private static final String APPLY_ORDER_PATH = "/api/settle/applyOrder"; |
| | | private static final String APPLY_ORDER_PATH = "/api/pay/applyOrder"; |
| | | /** OkHttp JSON MediaType */ |
| | | private static final MediaType JSON_MEDIA_TYPE = MediaType.parse("application/json;charset=UTF-8"); |
| | | |
| | |
| | | + (errCode != null ? " [" + errCode + ":" + errCodeDes + "]" : "")); |
| | | } |
| | | |
| | | // 验证签名 |
| | | // 验证签名(sign 不参与签名) |
| | | String respSign = json.getString("sign"); |
| | | if (StrUtil.isNotBlank(respSign)) { |
| | | TreeMap<String, String> verifyParams = new TreeMap<>(); |
| | |
| | | } |
| | | } |
| | | |
| | | // 检查业务结果 |
| | | // 检查业务结果:部分版本有 result_code,部分版本只有 return_code |
| | | String resultCode = json.getString("result_code"); |
| | | if (!"SUCCESS".equals(resultCode)) { |
| | | if (StrUtil.isNotBlank(resultCode) && !"SUCCESS".equals(resultCode)) { |
| | | throw new RuntimeException("BSPAY 下单业务失败: " + json.getString("err_code_des")); |
| | | } |
| | | |