jfinal-weixin 出现了一个问题"errcode":40163,"errmsg":"code been used, hints:

[ERROR]-[Thread: HTTP-9020-exec-13]-[com.jfinal.kit.LogKit.error()]: retry on 1 times but not matching v = {"errcode":40163,"errmsg":"code been used, hints: [ req_id: dSDqEa09468775 ]"}

项目上线了 报这个错。 不知道怎么解决。


贴上代码

 index() IOException, NoSuchAlgorithmException {
        subscribe = ;
        String code = getPara();
        String state = getPara();
        (code != ) {
            String appId = ApiConfigKit.().getAppId();
            String secret = ApiConfigKit.().getAppSecret();
            SnsAccessToken snsAccessToken = SnsAccessTokenApi.(appId, secret, code);
String token = snsAccessToken.getAccessToken();
            String openId = snsAccessToken.getOpenid();
            ApiResult apiResult = SnsApi.(token, openId);

            .warn(+ apiResult.getJson());
            (apiResult.isSucceed()) {
                JSONObject jsonObject = JSON.(apiResult.getJson());
                String nickName = jsonObject.getString();
                sex = jsonObject.getIntValue();
                String city = jsonObject.getString();String province = jsonObject.getString();String country = jsonObject.getString();String headimgurl = jsonObject.getString();
                String unionid = jsonObject.getString();

            }

            setSessionAttr(, openId);

(state.equals()) {
                redirect();
            } (state.equals()) {
                redirect();
            } {
                redirect();
            }
        } {
         String signature = getPara();String timestamp = getPara();String nonce = getPara();String echostr = getPara();PrintWriter out =  getResponse().getWriter();  
            renderText(echostr);
        }







  oauth() {
String calbackUrl = ;
String url = SnsAccessTokenApi.(PropKit.(),  StringUtils.(calbackUrl), , );
        redirect(url);

    }


评论区

lgk_l

2019-01-08 16:52

40163 估计是 code 的问题

热门反馈

扫码入社