记得上下班打卡 | git大法好,push需谨慎

Commit c442be58 authored by anjiabin's avatar anjiabin

修改通知逻辑

parent d47b79d6
...@@ -88,10 +88,8 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl ...@@ -88,10 +88,8 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl
throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_HAS_PAID.getCode(),DragonErrorCodeEnum.TRADE_ERROR_HAS_PAID.getMessage()); throw new LiquidnetServiceException(DragonErrorCodeEnum.TRADE_ERROR_HAS_PAID.getCode(),DragonErrorCodeEnum.TRADE_ERROR_HAS_PAID.getMessage());
} }
String partnerKey = "";
String sign = notifyMap.remove("sign"); String sign = notifyMap.remove("sign");
if (PayWepayUtils.notifySign(notifyMap, sign, partnerKey)) {// 根据配置信息验证签名 if (PayWepayUtils.getInstance().notifySign(notifyMap, sign)) {// 根据配置信息验证签名
if (WepayConstant.WeixinTradeStateEnum.SUCCESS.getCode().equals(notifyMap.get("result_code"))) {// 业务结果 if (WepayConstant.WeixinTradeStateEnum.SUCCESS.getCode().equals(notifyMap.get("result_code"))) {// 业务结果
// 成功 // 成功
String timeEndStr = notifyMap.get("time_end"); String timeEndStr = notifyMap.get("time_end");
......
...@@ -190,8 +190,8 @@ public class PayWepayUtils { ...@@ -190,8 +190,8 @@ public class PayWepayUtils {
return this.partnerKey; return this.partnerKey;
} }
public static boolean notifySign(Map<String, String> result, String sign, String partnerKey) { public boolean notifySign(Map<String, String> result, String sign) {
String argNotifySign = getStringByStringMap(result) + "&key=" + partnerKey; String argNotifySign = getStringByStringMap(result) + "&key=" + this.partnerKey;
String notifySign = MD5Utils.md5(argNotifySign).toUpperCase(); String notifySign = MD5Utils.md5(argNotifySign).toUpperCase();
if (notifySign.equals(sign)) { if (notifySign.equals(sign)) {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment