| @@ 81-95 (lines=15) @@ | ||
| 78 | return $this->errorMessage; |
|
| 79 | } |
|
| 80 | ||
| 81 | public function validate($phone) |
|
| 82 | { |
|
| 83 | try { |
|
| 84 | $response = $this->client->post('/v1/users/auth/validate', [ |
|
| 85 | 'form_params' => [ |
|
| 86 | 'mobile' => $phone |
|
| 87 | ] |
|
| 88 | ]); |
|
| 89 | } catch (ClientException $e) { |
|
| 90 | return $this->handleException($e); |
|
| 91 | } |
|
| 92 | ||
| 93 | return $this->resolveResponse($response); |
|
| 94 | ||
| 95 | } |
|
| 96 | ||
| 97 | public function initiateAuthorization($phone, $factor = 'sms') |
|
| 98 | { |
|
| @@ 138-152 (lines=15) @@ | ||
| 135 | return $this->resolveResponse($response); |
|
| 136 | } |
|
| 137 | ||
| 138 | public function refreshToken($refreshToken) |
|
| 139 | { |
|
| 140 | ||
| 141 | try { |
|
| 142 | $response = $this->client->post('/v1//users/accessToken', [ |
|
| 143 | 'form_params' => [ |
|
| 144 | 'refreshToken' => $refreshToken, |
|
| 145 | ] |
|
| 146 | ]); |
|
| 147 | } catch (ClientException $e) { |
|
| 148 | return $this->handleException($e); |
|
| 149 | } |
|
| 150 | ||
| 151 | return $this->resolveResponse($response); |
|
| 152 | } |
|
| 153 | ||
| 154 | public function transferToPhone($walletToken, $amount, $mobile) |
|
| 155 | { |
|
| @@ 215-227 (lines=13) @@ | ||
| 212 | return $this->resolveResponse($response); |
|
| 213 | } |
|
| 214 | ||
| 215 | public function balance($walletToken) |
|
| 216 | { |
|
| 217 | ||
| 218 | try { |
|
| 219 | $response = $this->client->get('/v1/users/accessToken', [ |
|
| 220 | 'headers' => ['X-App-Wallet-Access-Token' => $walletToken] |
|
| 221 | ]); |
|
| 222 | ||
| 223 | return $this->resolveResponse($response); |
|
| 224 | } catch (ClientException $e) { |
|
| 225 | return $this->handleException($e); |
|
| 226 | } |
|
| 227 | } |
|
| 228 | ||
| 229 | public function banks() |
|
| 230 | { |
|