no message
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user