🎨【微信支付】spring-boot-starter模块增加公钥ID和证书文件路径等配置项

This commit is contained in:
superffan 2025-01-24 21:27:34 +08:00 committed by GitHub
parent d65e2f27a9
commit f3c1422354
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions
spring-boot-starters/wx-java-pay-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/pay

View File

@ -57,6 +57,8 @@ public class WxPayAutoConfiguration {
payConfig.setPrivateCertPath(StringUtils.trimToNull(this.properties.getPrivateCertPath()));
payConfig.setCertSerialNo(StringUtils.trimToNull(this.properties.getCertSerialNo()));
payConfig.setApiV3Key(StringUtils.trimToNull(this.properties.getApiv3Key()));
payConfig.setPublicKeyId(StringUtils.trimToNull(this.properties.getPublicKeyId()));
payConfig.setPublicKeyPath(StringUtils.trimToNull(this.properties.getPublicKeyPath()));
wxPayService.setConfig(payConfig);
return wxPayService;

View File

@ -73,7 +73,17 @@ public class WxPayProperties {
* apiv3 商户apiclient_cert.pem
*/
private String privateCertPath;
/**
* 公钥ID
*/
private String publicKeyId;
/**
* pub_key.pem证书文件的绝对路径或者以classpath:开头的类路径.
*/
private String publicKeyPath;
/**
* 微信支付是否使用仿真测试环境.
* 默认不使用