fix: 微信支付问题修复,bug。

This commit is contained in:
tianyongbao
2026-03-08 23:30:06 +08:00
parent 4c8e174261
commit b42f46d898

View File

@@ -52,7 +52,7 @@ public class WxPayConfiguration {
// 私钥配置优先使用privateContent避免文件不存在的问题
if (wxPayProperties.getPrivateContent() != null && !wxPayProperties.getPrivateContent().isEmpty()) {
payConfig.setPrivateCertContent(wxPayProperties.getPrivateContent().getBytes());
payConfig.setPrivateKeyContent(wxPayProperties.getPrivateContent().getBytes(java.nio.charset.StandardCharsets.UTF_8));
log.info("使用私钥内容配置");
} else if (wxPayProperties.getPrivateKeyPath() != null) {
payConfig.setPrivateKeyPath(wxPayProperties.getPrivateKeyPath());