| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function getToken($client_secret) |
||
| 16 | { |
||
| 17 | // Initiate GetToken resource. |
||
| 18 | $resource = new GetToken($this->app, $this->getSubscriptionKey(), $client_secret); |
||
| 19 | |||
| 20 | /** @var \zaporylie\Vipps\Model\Authorization\ResponseGetToken $response */ |
||
| 21 | $response = $resource->call(); |
||
| 22 | |||
| 23 | // Save token on Client for future use. |
||
| 24 | $this->app->getClient()->getTokenStorage()->set($response); |
||
| 25 | |||
| 26 | return $response; |
||
| 27 | } |
||
| 28 | } |
||
| 29 |