|
@@ -86,7 +86,8 @@ public class WxPayServiceMy {
|
|
|
}
|
|
|
|
|
|
public String getOpenIdCode(Long orderId) throws UnsupportedEncodingException {
|
|
|
- return String.format("https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=%s#wechat_redirect",
|
|
|
+ String oAuth2Url = wxConfig.getOAuth2Url();
|
|
|
+ return String.format("https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=%s#wechat_redirect",
|
|
|
wxConfig.getAppId(), URLEncoder.encode(wxConfig.getOAuth2Url(), "UTF-8"), "snsapi_base", orderId);
|
|
|
|
|
|
}
|