session()->has('wechat_pay_openid')) { if ($request->route()->getName() != 'mobile.auth.thirdlogin.official.openid') { session(['wechat_pay_redirect_url' => $request->fullUrl()]); session(['wechat_pay_state' => time()]); $wechat_url = "https://open.weixin.qq.com/connect/oauth2/authorize?" . "appid=" . config('aix.system.pay.wechat.appid') . "&redirect_uri=" . urlencode(route('mobile.auth.thirdlogin.official.openid')) . "&response_type=code&scope=snsapi_base&state=" . session('wechat_pay_state') . "#wechat_redirect"; return redirect($wechat_url); } } } return $next($request); } }