no message

This commit is contained in:
2025-08-27 02:08:10 +08:00
parent 2c9f5b8a5a
commit 761bb78e43
10 changed files with 142 additions and 7 deletions

View File

@ -58,6 +58,8 @@ public class WechatPayService {
@Value("${wechat.pay.refund-notify-url}")
private String refundNotifyUrl;
@Value("${cert-path}")
private String certPath;
/**
* 项目初始化时获取服务器公网IP
@ -266,19 +268,14 @@ public class WechatPayService {
refundNotifyUrl
);
String certPath = "classpath*:cert/"+companyConfig.getMchId()+".p12";
String certAbsolutePath = getCertAbsolutePath(certPath);
String path = certPath+companyConfig.getMchId()+".p12";
String certAbsolutePath = getCertAbsolutePath(path);
wxPayConfig.setCertPath(certAbsolutePath);
WXPay wxPay = new WXPay(wxPayConfig);
// 退款需要证书,这里调用带证书的接口
Map<String, String> result = wxPay.refund(reqData);