mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-27 11:53:48 +08:00
🎨 #3591【微信支付】修复只设置privateKeyString或者privateKeyContent时私钥初始化失败的问题
This commit is contained in:
@ -345,7 +345,7 @@ public class WxPayConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 加载api私钥
|
// 加载api私钥
|
||||||
if (merchantPrivateKey == null && StringUtils.isNotBlank(this.getPrivateKeyPath())) {
|
if (merchantPrivateKey == null && (StringUtils.isNotBlank(this.getPrivateKeyPath()) || StringUtils.isNotBlank(this.getPrivateKeyString()) || null != this.privateKeyContent)) {
|
||||||
try (InputStream keyInputStream = this.loadConfigInputStream(this.getPrivateKeyString(), this.getPrivateKeyPath(),
|
try (InputStream keyInputStream = this.loadConfigInputStream(this.getPrivateKeyString(), this.getPrivateKeyPath(),
|
||||||
this.privateKeyContent, "privateKeyPath")) {
|
this.privateKeyContent, "privateKeyPath")) {
|
||||||
merchantPrivateKey = PemUtils.loadPrivateKey(keyInputStream);
|
merchantPrivateKey = PemUtils.loadPrivateKey(keyInputStream);
|
||||||
|
|||||||
Reference in New Issue
Block a user