@@ -120,7 +120,7 @@ public WxMpPayRefundResult refund(WxMpPayRefundRequest request, File keyFile)
120120 request .setSign (sign );
121121
122122 String url = PAY_BASE_URL + "/secapi/pay/refund" ;
123- String responseContent = this .executeRequestWithKeyFile (url , xstream .toXML (request ), keyFile , partnerId );
123+ String responseContent = this .executeRequestWithKeyFile (url , keyFile , xstream .toXML (request ), partnerId );
124124 WxMpPayRefundResult wxMpPayRefundResult = (WxMpPayRefundResult ) xstream .fromXML (responseContent );
125125
126126 if (!"SUCCESS" .equalsIgnoreCase (wxMpPayRefundResult .getResultCode ())
@@ -181,7 +181,7 @@ public WxRedpackResult sendRedpack(WxSendRedpackRequest request, File keyFile)
181181 url = PAY_BASE_URL + "/mmpaymkttransfers/sendgroupredpack" ;
182182 }
183183
184- String responseContent = this .executeRequestWithKeyFile (url , xstream .toXML (request ), keyFile , mchId );
184+ String responseContent = this .executeRequestWithKeyFile (url , keyFile , xstream .toXML (request ), mchId );
185185 WxRedpackResult redpackResult = (WxRedpackResult ) xstream
186186 .fromXML (responseContent );
187187 if ("FAIL" .equals (redpackResult .getResultCode ())) {
@@ -360,7 +360,7 @@ public WxEntPayResult entPay(WxEntPayRequest request, File keyFile) throws WxErr
360360
361361 String url = PAY_BASE_URL + "/mmpaymkttransfers/promotion/transfers" ;
362362
363- String responseContent = this .executeRequestWithKeyFile (xstream .toXML (request ), url , keyFile , request .getMchId ());
363+ String responseContent = this .executeRequestWithKeyFile (url , keyFile , xstream .toXML (request ), request .getMchId ());
364364 WxEntPayResult result = (WxEntPayResult ) xstream .fromXML (responseContent );
365365 if ("FAIL" .equals (result .getResultCode ())) {
366366 throw new WxErrorException (
@@ -369,7 +369,7 @@ public WxEntPayResult entPay(WxEntPayRequest request, File keyFile) throws WxErr
369369 return result ;
370370 }
371371
372- private String executeRequestWithKeyFile ( String requestStr , String url , File keyFile , String mchId ) throws WxErrorException {
372+ private String executeRequestWithKeyFile ( String url , File keyFile , String requestStr , String mchId ) throws WxErrorException {
373373 try (FileInputStream inputStream = new FileInputStream (keyFile )) {
374374 KeyStore keyStore = KeyStore .getInstance ("PKCS12" );
375375 keyStore .load (inputStream , mchId .toCharArray ());
0 commit comments