|
@@ -1,14 +1,6 @@
|
|
|
package io.renren.modules.qmgj.util;
|
|
package io.renren.modules.qmgj.util;
|
|
|
|
|
|
|
|
-import java.io.FileInputStream;
|
|
|
|
|
-import java.security.KeyStore;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
-
|
|
|
|
|
-import javax.net.ssl.SSLContext;
|
|
|
|
|
-
|
|
|
|
|
-import com.github.wxpay.sdk.WXPay;
|
|
|
|
|
import com.github.wxpay.sdk.WXPayUtil;
|
|
import com.github.wxpay.sdk.WXPayUtil;
|
|
|
-import io.renren.common.exception.RRException;
|
|
|
|
|
import io.renren.common.utils.config.PropertiesParameter;
|
|
import io.renren.common.utils.config.PropertiesParameter;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.http.HttpEntity;
|
|
import org.apache.http.HttpEntity;
|
|
@@ -21,6 +13,11 @@ import org.apache.http.impl.client.HttpClients;
|
|
|
import org.apache.http.ssl.SSLContexts;
|
|
import org.apache.http.ssl.SSLContexts;
|
|
|
import org.apache.http.util.EntityUtils;
|
|
import org.apache.http.util.EntityUtils;
|
|
|
|
|
|
|
|
|
|
+import javax.net.ssl.SSLContext;
|
|
|
|
|
+import java.io.InputStream;
|
|
|
|
|
+import java.security.KeyStore;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 微信支付工具类
|
|
* 微信支付工具类
|
|
|
*/
|
|
*/
|
|
@@ -51,7 +48,7 @@ public class PayUtil {
|
|
|
|
|
|
|
|
String filepath = PropertiesParameter.PROP.getProperty("refund.file.url");
|
|
String filepath = PropertiesParameter.PROP.getProperty("refund.file.url");
|
|
|
System.out.println("filepath->" + filepath);
|
|
System.out.println("filepath->" + filepath);
|
|
|
- try (FileInputStream instream = new FileInputStream(filepath)) {
|
|
|
|
|
|
|
+ try (InputStream instream = Thread.currentThread().getContextClassLoader().getResourceAsStream(filepath)) {
|
|
|
// 这里写密码..默认是你的MCHID
|
|
// 这里写密码..默认是你的MCHID
|
|
|
keyStore.load(instream, mchId.toCharArray());
|
|
keyStore.load(instream, mchId.toCharArray());
|
|
|
}
|
|
}
|