@@ -385,7 +385,7 @@ public byte[] createScanPayQrcodeMode1(String productId, File logoFile, Integer
385
385
String content = createScanPayQrcodeMode1 (productId );
386
386
return createQrcode (content , logoFile , sideLength );
387
387
}
388
-
388
+
389
389
@ Override
390
390
public String createScanPayQrcodeMode1 (String productId ){
391
391
//weixin://wxpay/bizpayurl?sign=XXXXX&appid=XXXXX&mch_id=XXXXX&product_id=XXXXXX&time_stamp=XXXXXX&nonce_str=XXXXX
@@ -400,7 +400,7 @@ public String createScanPayQrcodeMode1(String productId){
400
400
String sign = this .createSign (params );
401
401
params .put ("sign" , sign );
402
402
403
-
403
+
404
404
for (String key : params .keySet ()) {
405
405
codeUrl .append (key + "=" + params .get (key ) + "&" );
406
406
}
@@ -414,7 +414,7 @@ public String createScanPayQrcodeMode1(String productId){
414
414
public byte [] createScanPayQrcodeMode2 (String codeUrl , File logoFile , Integer sideLength ) {
415
415
return createQrcode (codeUrl , logoFile , sideLength );
416
416
}
417
-
417
+
418
418
private byte [] createQrcode (String content , File logoFile , Integer sideLength ) {
419
419
if (sideLength == null || sideLength < 1 ) {
420
420
return QrcodeUtils .createQrcode (content , logoFile );
@@ -491,7 +491,7 @@ private String postWithKey(String url, String requestStr) throws WxErrorExceptio
491
491
HttpPost httpPost = new HttpPost (url );
492
492
493
493
try (CloseableHttpClient httpclient = HttpClients .custom ().setSSLSocketFactory (sslsf ).build ()) {
494
- httpPost .setEntity (new StringEntity (new String (requestStr .getBytes ("UTF-8" ), "ISO-8859-1" )));
494
+ httpPost .setEntity (new StringEntity (new String (requestStr .getBytes (CharEncoding . UTF_8 ), CharEncoding . ISO_8859_1 )));
495
495
try (CloseableHttpResponse response = httpclient .execute (httpPost )) {
496
496
String result = EntityUtils .toString (response .getEntity (), Consts .UTF_8 );
497
497
this .log .debug ("\n [URL]: {}\n [PARAMS]: {}\n [RESPONSE]: {}" , url , requestStr , result );
0 commit comments