fixed payment bug.....
This commit is contained in:
parent
7a870343b9
commit
72514a8433
@ -46,8 +46,7 @@ public class Weixin4jSettings {
|
|||||||
* 默认使用weixin4j.properties配置的信息
|
* 默认使用weixin4j.properties配置的信息
|
||||||
*/
|
*/
|
||||||
public Weixin4jSettings() {
|
public Weixin4jSettings() {
|
||||||
this(JSON.parseObject(Weixin4jConfigUtil.getValue("account"),
|
this(JSON.parseObject(Weixin4jConfigUtil.getValue("account"), WeixinPayAccount.class), null);
|
||||||
WeixinPayAccount.class), "classpath:ca.p12");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,8 +57,7 @@ public class Weixin4jSettings {
|
|||||||
* @param certificateFile
|
* @param certificateFile
|
||||||
* 支付接口需要的证书文件(*.p12),比如退款接口
|
* 支付接口需要的证书文件(*.p12),比如退款接口
|
||||||
*/
|
*/
|
||||||
public Weixin4jSettings(WeixinPayAccount weixinPayAccount,
|
public Weixin4jSettings(WeixinPayAccount weixinPayAccount, String certificateFile) {
|
||||||
String certificateFile) {
|
|
||||||
this(weixinPayAccount);
|
this(weixinPayAccount);
|
||||||
this.certificateFile = certificateFile;
|
this.certificateFile = certificateFile;
|
||||||
}
|
}
|
||||||
@ -72,8 +70,7 @@ public class Weixin4jSettings {
|
|||||||
*/
|
*/
|
||||||
public Weixin4jSettings(WeixinPayAccount weixinPayAccount) {
|
public Weixin4jSettings(WeixinPayAccount weixinPayAccount) {
|
||||||
this.weixinPayAccount = weixinPayAccount;
|
this.weixinPayAccount = weixinPayAccount;
|
||||||
this.weixinAccount = new WeixinAccount(weixinPayAccount.getId(),
|
this.weixinAccount = new WeixinAccount(weixinPayAccount.getId(), weixinPayAccount.getSecret());
|
||||||
weixinPayAccount.getSecret());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,8 +107,7 @@ public class Weixin4jSettings {
|
|||||||
|
|
||||||
public String getTmpdir0() {
|
public String getTmpdir0() {
|
||||||
if (StringUtil.isBlank(tmpdir)) {
|
if (StringUtil.isBlank(tmpdir)) {
|
||||||
return Weixin4jConfigUtil.getClassPathValue("weixin4j.tmpdir",
|
return Weixin4jConfigUtil.getClassPathValue("weixin4j.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||||
System.getProperty("java.io.tmpdir"));
|
|
||||||
}
|
}
|
||||||
return tmpdir;
|
return tmpdir;
|
||||||
}
|
}
|
||||||
@ -133,8 +129,7 @@ public class Weixin4jSettings {
|
|||||||
|
|
||||||
public String getCertificateFile0() {
|
public String getCertificateFile0() {
|
||||||
if (StringUtil.isBlank(certificateFile)) {
|
if (StringUtil.isBlank(certificateFile)) {
|
||||||
return Weixin4jConfigUtil.getClassPathValue(
|
return Weixin4jConfigUtil.getClassPathValue("weixin4j.certificate.file", "classpath:ca.p12");
|
||||||
"weixin4j.certificate.file", "classpath:ca.p12");
|
|
||||||
}
|
}
|
||||||
return certificateFile;
|
return certificateFile;
|
||||||
}
|
}
|
||||||
@ -157,9 +152,7 @@ public class Weixin4jSettings {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Weixin4jSettings [weixinAccount=" + weixinAccount
|
return "Weixin4jSettings [weixinAccount=" + weixinAccount + ", httpParams=" + httpParams + ",tokenStorager="
|
||||||
+ ", httpParams=" + httpParams + ",tokenStorager="
|
+ tokenStorager + ", tmpdir=" + tmpdir + ", certificateFile= " + certificateFile + "]";
|
||||||
+ tokenStorager + ", tmpdir=" + tmpdir + ", certificateFile= "
|
|
||||||
+ certificateFile + "]";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user