| | |
| | | package com.oying.modules.hwc.service.impl; |
| | | |
| | | import com.oying.exception.BadRequestException; |
| | | import com.oying.modules.hwc.service.CallbackService; |
| | | import com.oying.modules.hwc.utils.SignUtil; |
| | | import com.oying.modules.hwc.utils.XmlUtils; |
| | | import com.oying.modules.security.config.SwiftPassProperties; |
| | | import com.oying.modules.sh.domain.OrderReturn; |
| | | import com.oying.modules.sh.domain.vo.OrderResponse; |
| | | import com.oying.modules.sh.domain.vo.OrderReturnResponse; |
| | | import com.oying.modules.sh.service.OrderReturnService; |
| | | import com.oying.modules.sh.service.OrderService; |
| | | import com.oying.utils.enums.OrderStatusEnum; |
| | |
| | | response.getWriter().write(respString); |
| | | } catch (Exception e) { |
| | | log.error("汇旺财支付回调失败:{}", map.toString()); |
| | | throw new BadRequestException("操作失败,原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | String sign_type = map.get("sign_type"); |
| | | String reSign = map.get("sign"); |
| | | if (map.containsKey("sign")) { |
| | | OrderReturn order = returnService.getByReturnNum(map.get("out_refund_no")); |
| | | PayTypeEnum status = PayTypeEnum.find(order.getPayType()); |
| | | OrderReturnResponse order = returnService.getByReturnNum(map.get("out_refund_no")); |
| | | PayTypeEnum status = PayTypeEnum.find(order.getOrderReturn().getPayType()); |
| | | if (SignUtil.verifySign(reSign, sign_type, map, properties, status)) { |
| | | log.error("汇旺财退款验证签名错误!:{}", map.toString()); |
| | | } else { |
| | |
| | | response.getWriter().write(respString); |
| | | } catch (Exception e) { |
| | | log.error("汇旺财退款回调失败:{}", map.toString()); |
| | | System.out.println("操作失败,原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |