dev-discount
袁野 4 years ago
commit 733eebbae4
  1. 7
      hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java
  2. 1
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  3. 4
      hai-service/src/main/java/com/hai/service/pay/impl/NotifyServiceImpl.java

@ -45,7 +45,12 @@ public class WechatPayController {
String notifyXml = null; // 微信支付系统发送的数据(<![CDATA[product_001]]>格式)
notifyXml = IOUtil.inputStreamToString(request.getInputStream(), "UTF-8");
/*if (SignatureUtil.reCheckIsSignValidFromWeiXin(notifyXml, SysConst.getSysConfig().getWxApiKey(), "UTF-8")) {
log.info("微信支付系统发送的数据:" + notifyXml);
SortedMap<String, String> map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8");
resXml = notifyService.wechatNotify(map);
/* if (SignatureUtil.reCheckIsSignValidFromWeiXin(notifyXml, SysConst.getSysConfig().getWxApiKey(), "UTF-8")) {
log.info("微信支付系统发送的数据:" + notifyXml);
SortedMap<String, String> map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8");

@ -116,6 +116,7 @@ public class HighUserServiceImpl implements HighUserService {
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户金币处理异常");
}
highUserMapper.updateByPrimaryKey(user);
HighGoldRec highGoldRec = new HighGoldRec();
highGoldRec.setUserId(user.getId());

@ -75,10 +75,8 @@ public class NotifyServiceImpl implements NotifyService {
if ("SUCCESS".equals(paramsMap.get("return_code")) && "SUCCESS".equals(paramsMap.get("result_code"))) {
log.info("微信支付 -> 异步通知:支付成功,进入订单处理");
String orderScene = paramsMap.get("attach");
JSONObject object = JSONObject.parseObject(orderScene);
// 订单类型
String orderType = object.getString("orderScene");
String orderType = paramsMap.get("attach");
PayService payService = getPayService(orderType);
if (payService != null) {
payService.paySuccess(paramsMap, "WechatPay"); // 商户内部实际的交易业务处理

Loading…
Cancel
Save