@@ -128,6 +128,7 @@ public String postV3(String url, String requestStr) throws WxPayException {
128128 }
129129
130130 private String requestV3 (String url , String requestStr , HttpRequestBase httpRequestBase ) throws WxPayException {
131+ this .checkV3SandboxNotSupported ();
131132 CloseableHttpClient httpClient = this .createApiV3HttpClient ();
132133 try (CloseableHttpResponse response = httpClient .execute (httpRequestBase )) {
133134 //v3已经改为通过状态码判断200 204 成功
@@ -163,6 +164,7 @@ public String patchV3(String url, String requestStr) throws WxPayException {
163164
164165 @ Override
165166 public String postV3WithWechatpaySerial (String url , String requestStr ) throws WxPayException {
167+ this .checkV3SandboxNotSupported ();
166168 HttpPost httpPost = this .createHttpPost (url , requestStr );
167169 this .configureRequest (httpPost );
168170 CloseableHttpClient httpClient = this .createApiV3HttpClient ();
@@ -199,6 +201,7 @@ public String postV3(String url, HttpPost httpPost) throws WxPayException {
199201
200202 @ Override
201203 public String requestV3 (String url , HttpRequestBase httpRequest ) throws WxPayException {
204+ this .checkV3SandboxNotSupported ();
202205 this .configureRequest (httpRequest );
203206 CloseableHttpClient httpClient = this .createApiV3HttpClient ();
204207 try (CloseableHttpResponse response = httpClient .execute (httpRequest )) {
@@ -243,6 +246,7 @@ public String getV3WithWechatPaySerial(String url) throws WxPayException {
243246
244247 @ Override
245248 public InputStream downloadV3 (String url ) throws WxPayException {
249+ this .checkV3SandboxNotSupported ();
246250 HttpGet httpGet = new WxPayV3DownloadHttpGet (url );
247251 this .configureRequest (httpGet );
248252 CloseableHttpClient httpClient = this .createApiV3HttpClient ();
@@ -285,6 +289,7 @@ public String deleteV3(String url) throws WxPayException {
285289 }
286290
287291 private void configureRequest (HttpRequestBase request ) {
292+ this .checkV3SandboxNotSupported ();
288293 String serialNumber = getWechatPaySerial (getConfig ());
289294 String method = request .getMethod ();
290295 request .addHeader (ACCEPT , APPLICATION_JSON );
0 commit comments