mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 18:46:10 +08:00 
			
		
		
		
	增加设置方法,方便设置是否使用微信支付仿真测试环境 #224
This commit is contained in:
		| @ -22,6 +22,7 @@ public class WxPayConfig { | |||||||
|   private String tradeType; |   private String tradeType; | ||||||
|   private SSLContext sslContext; |   private SSLContext sslContext; | ||||||
|   private String keyPath; |   private String keyPath; | ||||||
|  |   private boolean useSandboxEnv = false; | ||||||
|  |  | ||||||
|   public void setNotifyUrl(String notifyUrl) { |   public void setNotifyUrl(String notifyUrl) { | ||||||
|     this.notifyUrl = notifyUrl; |     this.notifyUrl = notifyUrl; | ||||||
| @ -130,7 +131,14 @@ public class WxPayConfig { | |||||||
|    * 默认不使用 |    * 默认不使用 | ||||||
|    */ |    */ | ||||||
|   public boolean useSandbox() { |   public boolean useSandbox() { | ||||||
|     return false; |     return this.useSandboxEnv; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 设置是否使用沙箱仿真测试环境 | ||||||
|  |    */ | ||||||
|  |   public void setUseSandboxEnv(boolean useSandboxEnv) { | ||||||
|  |     this.useSandboxEnv = useSandboxEnv; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   public SSLContext initSSLContext() { |   public SSLContext initSSLContext() { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang