🎨 #3968【微信支付】修复微信支付api-host-url配置反向代理路径前缀时会导致v3签名异常的问题
This commit is contained in:
@@ -23,6 +23,8 @@ wx:
|
||||
pay:
|
||||
appId: xxxxxxxxxxx
|
||||
mchId: 15xxxxxxxxx #商户id
|
||||
apiHostUrl: http://10.0.0.1:3128 # 可选:代理主机
|
||||
apiHostUrlPath: /api-weixin # 可选:代理入口前缀
|
||||
apiV3Key: Dc1DBwSc094jACxxxxxxxxxxxxxxx #V3密钥
|
||||
certSerialNo: 62C6CEAA360BCxxxxxxxxxxxxxxx
|
||||
privateKeyPath: classpath:cert/apiclient_key.pem #apiclient_key.pem证书文件的绝对路径或者以classpath:开头的类路径
|
||||
|
||||
@@ -59,6 +59,7 @@ public class WxPayAutoConfiguration {
|
||||
payConfig.setPublicKeyId(StringUtils.trimToNull(this.properties.getPublicKeyId()));
|
||||
payConfig.setPublicKeyPath(StringUtils.trimToNull(this.properties.getPublicKeyPath()));
|
||||
payConfig.setApiHostUrl(StringUtils.trimToNull(this.properties.getApiHostUrl()));
|
||||
payConfig.setApiHostUrlPath(StringUtils.trimToNull(this.properties.getApiHostUrlPath()));
|
||||
payConfig.setStrictlyNeedWechatPaySerial(this.properties.isStrictlyNeedWechatPaySerial());
|
||||
payConfig.setFullPublicKeyModel(this.properties.isFullPublicKeyModel());
|
||||
|
||||
|
||||
@@ -113,6 +113,12 @@ public class WxPayProperties {
|
||||
*/
|
||||
private String apiHostUrl;
|
||||
|
||||
/**
|
||||
* 自定义API主机路径前缀(用于代理入口前缀)
|
||||
* 例如:/api-weixin
|
||||
*/
|
||||
private String apiHostUrlPath;
|
||||
|
||||
/**
|
||||
* 是否将全部v3接口的请求都添加Wechatpay-Serial请求头,默认添加
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user