|
|
@@ -295,7 +295,7 @@ public class RegisterOrderDonServiceImpl extends ServiceImpl<RegisterOrderDonMap
|
|
|
}
|
|
|
|
|
|
// 校验签名
|
|
|
- boolean f = weChatService.checkSignWithMd5(map, shopConfigMapper.getByAppId(weChatConfig.getAppid()).getSecret());
|
|
|
+ boolean f = weChatService.checkSignWithMd5(map, shopConfigMapper.getByAppId(weChatConfig.getShopid()).getSecret());
|
|
|
if (!f) {
|
|
|
log.error("回调数据:{}", map);
|
|
|
throw BusinessRuntimeException.getInstance("支付成功回调, 校验签名失败.");
|
|
|
@@ -367,7 +367,7 @@ public class RegisterOrderDonServiceImpl extends ServiceImpl<RegisterOrderDonMap
|
|
|
@Override
|
|
|
public void wxRefundNotify(Map<String, String> map) throws Exception {
|
|
|
// 对退款数据 解密
|
|
|
- String md5Key = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.MD5).setStringData(shopConfigMapper.getByAppId(weChatConfig.getAppid()).getSecret()).toHexString();
|
|
|
+ String md5Key = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.MD5).setStringData(shopConfigMapper.getByAppId(weChatConfig.getShopid()).getSecret()).toHexString();
|
|
|
String reqInfoXml = Codec.DoCipher.custom().setAlgorithm(Codec.DoCipher.Trans.AES_ECB_PKCS7Padding).setBase64Data(map.get("req_info")).setStringKey(md5Key).ofDecrypt().toText();
|
|
|
log.info("=== 退款数据解密: \n {}", reqInfoXml);
|
|
|
Map<String, String> reqInfoMap = Xmls.toMap(reqInfoXml);
|