Procházet zdrojové kódy

[支付][修改]:更正验证微信返回信息的方式

release_toaliyun_real
hupeng před 7 roky
rodič
revize
7723b5a908
2 změnil soubory, kde provedl 5 přidání a 7 odebrání
  1. +1
    -1
      mallinkService/src/main/java/com/simple/service/impl/WxProfitSharingOrderServiceImpl.java
  2. +4
    -6
      mallinkService/src/main/java/com/simple/service/impl/WxProfitSharingReceiverServiceImpl.java

+ 1
- 1
mallinkService/src/main/java/com/simple/service/impl/WxProfitSharingOrderServiceImpl.java Zobrazit soubor

@@ -225,7 +225,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
throw new MallinkException(ErrorCode.PROFIT_SHARING_REQUEST_FAILED.getCode(), returnMap.get("return_msg"));
}

if (!WxPayment.verifyNotify(returnMap,payAccount.getApiKey())){
if (!WxPayment.verifyNotifyHMAC(returnMap,payAccount.getApiKey())){
throw new MallinkException(ErrorCode.PROFIT_SHARING_RETURN_INVALID.getCode(), ErrorCode.PROFIT_SHARING_RETURN_INVALID.getMessage());
}



+ 4
- 6
mallinkService/src/main/java/com/simple/service/impl/WxProfitSharingReceiverServiceImpl.java Zobrazit soubor

@@ -138,7 +138,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getCode(), returnMap.get("err_code_des"));
}

if (!WxPayment.verifyNotify(returnMap,payAccount.getApiKey())){
if (!WxPayment.verifyNotifyHMAC(returnMap,payAccount.getApiKey())){
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getCode(), ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getMessage());
}

@@ -192,15 +192,13 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), returnMap.get("return_msg"));
}

if (!WxPayment.verifyNotify(returnMap,payAccount.getApiKey())){
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getMessage());
}

String result_code = returnMap.get("result_code");
if (!"SUCCESS".equals(result_code)) {
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), returnMap.get("result_msg"));
}

if (!WxPayment.verifyNotifyHMAC(returnMap,payAccount.getApiKey())){
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getMessage());
}
wxProfitSharingReceiverMapper.deleteByPrimaryKey(receiver);
return new ResultData(returnMap);
}


Načítá se…
Zrušit
Uložit