qq_35082057
qq_35082057
2017-09-27 06:53

java微信支付,获取openid的方法不执行,导致获取不到openid,是为什么???

  • java
  • 支付
  • openid
  • 微信

@RequestMapping("/getCode.do")
// 获取微信code
public void getCode(HttpServletRequest request, HttpServletResponse response) throws IOException {
System.out.println("in getCode--------------------------");
String myurl = PayConstant.BASEURL;
String url = "https://open.weixin.qq.com/connect/oauth2/authorize?" + "appid=" + appID + "&redirect_uri="+ Uecode.encodeURIComponent(myurl + "autoTest/getOpenId.do")+ "&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
response.sendRedirect(url);;
}

getOpenId.do不执行导致获取不到openid,这是为什么???
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答

为你推荐

换一换