mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-06-28 13:16:19 +08:00
🎨 #3591【微信支付】修复只设置privateKeyString或者privateKeyContent时私钥初始化失败的问题
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
This commit is contained in:
parent
fefe737803
commit
3e1a38a696
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user