| | |
| | | package com.oying.modules.hwc.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.google.gson.Gson; |
| | | import com.oying.exception.BadRequestException; |
| | | import com.oying.modules.hwc.domain.HwcResponse; |
| | | import com.oying.modules.hwc.service.SwiftPassService; |
| | |
| | | throw new BadRequestException("验证签名错误"); |
| | | } else { |
| | | if ("0".equals(resultMap.get("status")) && "0".equals(resultMap.get("result_code"))) { |
| | | Gson gson = new Gson(); |
| | | return gson.fromJson(resultMap.get("pay_info"), HwcResponse.class); |
| | | return JSONObject.parseObject(resultMap.get("pay_info"), HwcResponse.class); |
| | | } else { |
| | | throw new BadRequestException(resultMap.get("err_code") + " : " + resultMap.get("err_msg") + "\n" + |
| | | resultMap.get("status") + " : " + resultMap.get("message")); |