Skip to content

微信支付退款回调,有乱码 #830

@buzzxu

Description

@buzzxu

退款回调的时候,refund_recv_accout值保存到mysql中乱码 ������������������
将源码 com.github.binarywang.wxpay.bean.notify.WxPayRefundNotifyResult.fromXML()方法中

result.setReqInfo(WxPayRefundNotifyResult.ReqInfo.fromXML(new String(cipher.doFinal(Base64.decodeBase64(reqInfoString)))));

改为:

result.setReqInfo(WxPayRefundNotifyResult.ReqInfo.fromXML(new String(cipher.doFinal(Base64.decodeBase64(reqInfoString)),"UTF-8")));

转成UTF-8就能解决。我用的是SpringBoot、JDK11,MySQL编码是utf8mb4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions