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

This commit is contained in:
tianyongbao
2026-03-08 23:30:06 +08:00
parent 7e708c1286
commit aa213e4d8d

View File

@@ -52,7 +52,7 @@ public class WxPayConfiguration {
// 私钥配置优先使用privateContent避免文件不存在的问题 // 私钥配置优先使用privateContent避免文件不存在的问题
if (wxPayProperties.getPrivateContent() != null && !wxPayProperties.getPrivateContent().isEmpty()) { 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("使用私钥内容配置"); log.info("使用私钥内容配置");
} else if (wxPayProperties.getPrivateKeyPath() != null) { } else if (wxPayProperties.getPrivateKeyPath() != null) {
payConfig.setPrivateKeyPath(wxPayProperties.getPrivateKeyPath()); payConfig.setPrivateKeyPath(wxPayProperties.getPrivateKeyPath());