| | |
| | | import com.matrix.component.wechat.externalInterface.common.Signature; |
| | | import com.matrix.component.wechat.externalInterface.common.Util; |
| | | import com.matrix.component.wechat.externalInterface.protocol.queryProtocol.NotifyData; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin; |
| | |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequestMapping(value = "/wxpayCallback") |
| | | @RequestMapping(value = "/wxapi/wxpayCallback") |
| | | public void payCallBack(HttpServletResponse response, HttpServletRequest request) throws IOException { |
| | | LogUtil.info("微信支付回调start...."); |
| | | |
| | |
| | | // 返回状态码 SUCCESS/FAIL |
| | | if (AppConstance.CODE_SUCCESS.equals(data.getReturn_code())) { |
| | | // 校验签名 |
| | | if (Signature.checkIsSignValidFromResponseString(notityXml.toString())) { |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, HostInterceptor.getCompanyId()); |
| | | if (Signature.checkIsSignValidFromResponseString(notityXml.toString(),paySecret.getParamValue())) { |
| | | // 校验业务结果 |
| | | if (AppConstance.CODE_SUCCESS.equals(data.getResult_code())) { |
| | | // 返回SUCCESS报文 |