修改dev配置
This commit is contained in:
parent
4bfb07e7c0
commit
9631bcd7a0
@ -1,58 +0,0 @@
|
||||
package cn.com.tenlion.operator.util.pay;
|
||||
|
||||
import com.wechat.pay.java.core.Config;
|
||||
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
|
||||
import com.wechat.pay.java.service.partnerpayments.nativepay.NativePayService;
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "wxpay") //读取wxpay节点
|
||||
@Data
|
||||
public class WxPayConfig {
|
||||
|
||||
// 商户号
|
||||
private String mchId;
|
||||
|
||||
// 商户API证书序列号
|
||||
private String mchSerialNo;
|
||||
|
||||
// 商户私钥文件
|
||||
private String privateKeyPath;
|
||||
|
||||
// APIv3密钥
|
||||
private String apiV3Key;
|
||||
|
||||
// APPID
|
||||
private String appid;
|
||||
|
||||
// 微信服务器地址
|
||||
private String domain;
|
||||
|
||||
// 接收结果通知地址
|
||||
private String notifyUrl;
|
||||
|
||||
|
||||
@Bean
|
||||
public Config getConfig(){
|
||||
Config config =
|
||||
new RSAAutoCertificateConfig.Builder()
|
||||
.merchantId(mchId)
|
||||
.privateKeyFromPath(privateKeyPath)
|
||||
.merchantSerialNumber(mchSerialNo)
|
||||
.apiV3Key(apiV3Key)
|
||||
.build();
|
||||
return config;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public NativePayService getPayUrlServices(){
|
||||
Config config = getConfig();
|
||||
// 构建service
|
||||
NativePayService service = new NativePayService.Builder().config(config).build();
|
||||
return service;
|
||||
}
|
||||
|
||||
}
|
@ -139,7 +139,7 @@ swagger:
|
||||
# 文件上传管理
|
||||
file:
|
||||
# 文件的保存路径
|
||||
upload-path: C:\Users\cmxx0\Desktop\UploadFiles\
|
||||
upload-path: C:\Users\TS-QD1\Desktop\UploadFiles\
|
||||
# 图片类型
|
||||
image-types: png,jpg,jpeg,gif,blob
|
||||
# 视频类型
|
||||
@ -207,7 +207,7 @@ pay:
|
||||
# 商户API证书序列号
|
||||
mch-no: 3492AF71B2FC29014997E16FF6499E27F7A0781B
|
||||
# 私钥本地存储路径
|
||||
private-key-path: D:\AH\apiclient_key.pem
|
||||
private-key-path: D:\WxCertUtils\WXCertUtil\cert\1609461201_20240203_cert\apiclient_key.pem
|
||||
# API v3密钥
|
||||
api-v3-key: _TSKJ_0471_TSkj_0471_tsKJ_0471__
|
||||
# 小程序APPID
|
||||
|
Loading…
Reference in New Issue
Block a user