'提交代码'

dev-discount
199901012 4 years ago
parent f917c1f1a2
commit f0ae3f7827
  1. 5
      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,6 +45,11 @@ public class WechatPayController {
String notifyXml = null; // 微信支付系统发送的数据(<![CDATA[product_001]]>格式) String notifyXml = null; // 微信支付系统发送的数据(<![CDATA[product_001]]>格式)
notifyXml = IOUtil.inputStreamToString(request.getInputStream(), "UTF-8"); notifyXml = IOUtil.inputStreamToString(request.getInputStream(), "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")) { /* if (SignatureUtil.reCheckIsSignValidFromWeiXin(notifyXml, SysConst.getSysConfig().getWxApiKey(), "UTF-8")) {
log.info("微信支付系统发送的数据:" + notifyXml); log.info("微信支付系统发送的数据:" + notifyXml);
SortedMap<String, String> map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8"); SortedMap<String, String> map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8");

@ -116,6 +116,7 @@ public class HighUserServiceImpl implements HighUserService {
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户金币处理异常"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户金币处理异常");
} }
highUserMapper.updateByPrimaryKey(user);
HighGoldRec highGoldRec = new HighGoldRec(); HighGoldRec highGoldRec = new HighGoldRec();
highGoldRec.setUserId(user.getId()); 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"))) { if ("SUCCESS".equals(paramsMap.get("return_code")) && "SUCCESS".equals(paramsMap.get("result_code"))) {
log.info("微信支付 -> 异步通知:支付成功,进入订单处理"); 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); PayService payService = getPayService(orderType);
if (payService != null) { if (payService != null) {
payService.paySuccess(paramsMap, "WechatPay"); // 商户内部实际的交易业务处理 payService.paySuccess(paramsMap, "WechatPay"); // 商户内部实际的交易业务处理

Loading…
Cancel
Save