diff --git a/README.md b/README.md index 7b47a46..abfaaf2 100644 --- a/README.md +++ b/README.md @@ -160,4 +160,4 @@ jeepay 微信扫码加入交流群,或添加微信号:`jiquanltd` 邀请进群 -![Jeepay微信交流群](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/wx_qun_702.png "Jeepay微信交流群") +![Jeepay微信交流群](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/wx_qun_705.png "Jeepay微信交流群") diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelUserService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelUserService.java index 66778f0..8c3ecff 100644 --- a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelUserService.java +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelUserService.java @@ -65,7 +65,7 @@ public class WxpayChannelUserService implements IChannelUserService { oauth2Url = DEFAULT_OAUTH_URL; } - return String.format(oauth2Url + "?appid=%s&scope=snsapi_base&state=&redirect_uri=%s", appId, callbackUrlEncode); + return String.format(oauth2Url + "?appid=%s&scope=snsapi_base&state=&redirect_uri=%s&response_type=code#wechat_redirect", appId, callbackUrlEncode); } @Override diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayV3Util.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayV3Util.java index 59de4d9..a879cf0 100644 --- a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayV3Util.java +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayV3Util.java @@ -77,7 +77,7 @@ public class WxpayV3Util { } public static JSONObject queryOrderV3(String url, WxPayConfig wxPayConfig) throws WxPayException { - String response = getV3(url, wxPayConfig); + String response = getV3(PAY_BASE_URL + url, wxPayConfig); return JSON.parseObject(response); } @@ -169,7 +169,7 @@ public class WxpayV3Util { throw wxPayException; } } catch (Exception e) { - log.error("\n【异常信息】:{}", url, e.getMessage()); + log.error("\n【异常信息】:{},e={}", url, e.getMessage()); throw (e instanceof WxPayException) ? (WxPayException) e : new WxPayException(e.getMessage(), e); } finally { httpGet.releaseConnection();