退款接口实现
This commit is contained in:
@@ -99,12 +99,12 @@ public class PayServiceImpl implements PayService {
|
||||
returnOrderInfo.getRefundAmount().setScale(2, RoundingMode.DOWN).multiply(new BigDecimal(100)).longValue(), callBack, null, thirdApply.getAppToken());
|
||||
log.info("福商通退款响应报文: {}", publicResp);
|
||||
if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) {
|
||||
if (!"000000".equals(publicResp.getCode())) {
|
||||
if ("000000".equals(publicResp.getCode())) {
|
||||
if (!"SUCCESS".equals(publicResp.getObjData().getState()) && !publicResp.getObjData().getState().equals("ING")) {
|
||||
throw new BadRequestException("退款渠道调用失败");
|
||||
throw new BadRequestException("退款渠道调用失败: " + publicResp.getMsg());
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("退款渠道调用失败");
|
||||
throw new BadRequestException("退款渠道调用失败: " + publicResp.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ThirdPayService {
|
||||
param.setSign(sign);
|
||||
String reqbody = JSONUtil.toJSONString(param);
|
||||
log.info("请求参数:{}", reqbody);
|
||||
String response = HttpRequest.post(url.concat(trade)).body(reqbody).execute().body();
|
||||
String response = HttpRequest.post(url.concat(refund)).body(reqbody).execute().body();
|
||||
log.info("返回结果:{}", response);
|
||||
PublicResp<OrderReturnResp> resp =JSONUtil.parseJSONStr2T(response,PublicResp.class);
|
||||
resp.setObjData(JSONUtil.parseJSONStr2T(resp.getBizData(),OrderReturnResp.class));
|
||||
|
||||
Reference in New Issue
Block a user