mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-23 22:11:40 +08:00
#830 修复微信支付退款通知解析代码在某些环境下可能会出现的乱码问题
This commit is contained in:
parent
b4833d1019
commit
9236f04d68
@ -58,7 +58,8 @@ public class WxPayRefundNotifyResult extends BaseWxPayResult implements Serializ
|
|||||||
|
|
||||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||||
cipher.init(Cipher.DECRYPT_MODE, key);
|
cipher.init(Cipher.DECRYPT_MODE, key);
|
||||||
result.setReqInfo(ReqInfo.fromXML(new String(cipher.doFinal(Base64.decodeBase64(reqInfoString)))));
|
result.setReqInfo(ReqInfo.fromXML(new String(cipher.doFinal(Base64.decodeBase64(reqInfoString)),
|
||||||
|
StandardCharsets.UTF_8)));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new WxPayException("解密退款通知加密信息时出错", e);
|
throw new WxPayException("解密退款通知加密信息时出错", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user