🎨 【微信支付】修复证书私钥问题

This commit is contained in:
zhoujiangzi2010
2024-03-29 11:25:43 +00:00
committed by Binary Wang
parent 2e3865fd21
commit fe5430ee65
2 changed files with 28 additions and 0 deletions

View File

@@ -263,6 +263,9 @@ public class WxPayConfig {
throw new WxPayException("请确保apiV3Key值已设置");
}
if(StringUtils.isNotBlank(this.getPrivateKeyString())){
this.setPrivateKeyString(Base64.getEncoder().encodeToString(this.getPrivateKeyString().getBytes()));
}
InputStream keyInputStream = this.loadConfigInputStream(this.getPrivateKeyString(), this.getPrivateKeyPath(),
this.privateKeyContent, "privateKeyPath");
try {