File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,15 +57,19 @@ private function accessToken()
5757 */
5858 public function authorizationUrl (string $ state = null , string $ view = null ): string
5959 {
60+ $ memberType = strtoupper ($ this ->app ->getConfig ('member_type ' ));
61+ if (!array_key_exists ($ memberType , static ::AUTHORIZE_API_ARR )) {
62+ throw new \InvalidArgumentException ('Invalid member type ' );
63+ }
6064 return sprintf (
6165 '%s?%s ' ,
62- static ::AUTHORIZE_API_ARR [strtoupper ( $ this -> app -> getConfig ( ' member_type ' )) ],
66+ static ::AUTHORIZE_API_ARR [$ memberType ],
6367 http_build_query ([
6468 'client_id ' => $ this ->accessToken ()->getClientId (),
6569 'response_type ' => 'code ' ,
6670 'state ' => $ state ,
6771 'redirect_uri ' => $ this ->accessToken ()->getRedirectUri (),
68- 'view ' => $ view ,
72+ 'view ' => $ memberType === ' H5 ' ? ' h5 ' : $ view ,
6973 ])
7074 );
7175 }
You can’t perform that action at this time.
0 commit comments