|
@@ -1030,7 +1030,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
@Override
|
|
@Override
|
|
|
public void wxRefundNotify(Map<String, String> map) throws Exception {
|
|
public void wxRefundNotify(Map<String, String> map) throws Exception {
|
|
|
// 对退款数据 解密
|
|
// 对退款数据 解密
|
|
|
- String md5Key = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.MD5).setStringData(weChatConfig.getShopKey()).toHexString();
|
|
|
|
|
|
|
+ String md5Key = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.MD5).setStringData(shopConfigMapper.getByAppId(map.get("mch_id")).getSecret()).toHexString();
|
|
|
String reqInfoXml = Codec.DoCipher.custom().setAlgorithm(Codec.DoCipher.Trans.AES_ECB_PKCS7Padding).setBase64Data(map.get("req_info")).setStringKey(md5Key).ofDecrypt().toText();
|
|
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);
|
|
log.info("=== 退款数据解密: \n {}", reqInfoXml);
|
|
|
Map<String, String> reqInfoMap = Xmls.toMap(reqInfoXml);
|
|
Map<String, String> reqInfoMap = Xmls.toMap(reqInfoXml);
|