@@ 62-73 (lines=12) @@ | ||
59 | * |
|
60 | * @return \EntWeChat\Support\Collection |
|
61 | */ |
|
62 | public function user($code = null) |
|
63 | { |
|
64 | if ($this->hasInvalidState()) { |
|
65 | throw new InvalidStateException(); |
|
66 | } |
|
67 | ||
68 | $params = [ |
|
69 | 'code' => $code ?: $this->request->get('code'), |
|
70 | ]; |
|
71 | ||
72 | return $this->parseJSON('get', [self::API_GET_USER_INFO, $params]); |
|
73 | } |
|
74 | ||
75 | /** |
|
76 | * @param $user_ticket |
@@ 65-76 (lines=12) @@ | ||
62 | * |
|
63 | * @return \EntWeChat\Support\Collection |
|
64 | */ |
|
65 | public function user($authCode = null) |
|
66 | { |
|
67 | if ($this->hasInvalidState()) { |
|
68 | throw new InvalidStateException(); |
|
69 | } |
|
70 | ||
71 | $params = [ |
|
72 | 'auth_code' => $authCode ?: $this->request->get('auth_code'), |
|
73 | ]; |
|
74 | ||
75 | return $this->parseJSON('json', [self::API_GET_LOGIN_INFO, $params]); |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * {@inheritdoc}. |
@@ 59-70 (lines=12) @@ | ||
56 | * |
|
57 | * @return \EntWeChat\Support\Collection |
|
58 | */ |
|
59 | public function user($code = null) |
|
60 | { |
|
61 | if ($this->hasInvalidState()) { |
|
62 | throw new InvalidStateException(); |
|
63 | } |
|
64 | ||
65 | $params = [ |
|
66 | 'code' => $code ?: $this->request->get('code'), |
|
67 | ]; |
|
68 | ||
69 | return $this->parseJSON('get', [self::API_GET_USER_INFO, $params]); |
|
70 | } |
|
71 | } |
|
72 |