增加设置方法,方便设置是否使用微信支付仿真测试环境 #224

This commit is contained in:
Binary Wang 2017-05-10 11:55:39 +08:00
parent a6d29d9c30
commit c21bad9e1d

View File

@ -22,6 +22,7 @@ public class WxPayConfig {
private String tradeType;
private SSLContext sslContext;
private String keyPath;
private boolean useSandboxEnv = false;
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
@ -130,7 +131,14 @@ public class WxPayConfig {
* 默认不使用
*/
public boolean useSandbox() {
return false;
return this.useSandboxEnv;
}
/**
* 设置是否使用沙箱仿真测试环境
*/
public void setUseSandboxEnv(boolean useSandboxEnv) {
this.useSandboxEnv = useSandboxEnv;
}
public SSLContext initSSLContext() {