|
@@ -1272,6 +1272,15 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
|
log.info("微信退款参数:{}"+JSON.toJSONString(data));
|
|
|
Map rMap = wxpay.refund(data);
|
|
|
log.info("微信退款结果:{}"+JSON.toJSONString(rMap));
|
|
|
+ if(Validator.isNotEmpty(rMap)){
|
|
|
+ if(rMap.containsKey("result_code")){
|
|
|
+ String result_code = (String)rMap.get("result_code");
|
|
|
+ if("FAIL".equals(result_code)){
|
|
|
+ String err_code_des = (String)rMap.get("err_code_des");
|
|
|
+ throw new CustomException("微信退款失败:"+err_code_des);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return rMap;
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|