@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | use Omnipay\Common\Message\NotificationInterface; |
9 | 9 | use Symfony\Component\HttpFoundation\Request as HttpRequest; |
10 | 10 | |
11 | -class AcceptNotification extends PurchaseRequest implements NotificationInterface{ |
|
11 | +class AcceptNotification extends PurchaseRequest implements NotificationInterface { |
|
12 | 12 | protected $data; |
13 | 13 | |
14 | 14 | protected $transaction; |
@@ -21,18 +21,18 @@ discard block |
||
21 | 21 | { |
22 | 22 | $sessionId = $this->httpRequest->query->get('sessionId') ?? $this->httpRequest->request->get('sessionId') ?? ''; |
23 | 23 | |
24 | - if ( empty($sessionId) ) { |
|
24 | + if (empty($sessionId)) { |
|
25 | 25 | throw new InvalidRequestException('Session id is required'); |
26 | 26 | } |
27 | 27 | |
28 | 28 | $headers = [ |
29 | 29 | 'Accept' => 'application/json', |
30 | 30 | 'Content-Type' => 'application/json', |
31 | - 'Authorization' => 'Basic ' . $this->getAuthorization() |
|
31 | + 'Authorization' => 'Basic '.$this->getAuthorization() |
|
32 | 32 | ]; |
33 | 33 | |
34 | 34 | try { |
35 | - $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/' . $sessionId), $headers); |
|
35 | + $httpResponse = $this->httpClient->request('GET', $this->getEndpoint('sessions/'.$sessionId), $headers); |
|
36 | 36 | } catch (\Exception $exception) { |
37 | 37 | throw new InvalidRequestException($exception->getMessage()); |
38 | 38 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function getTransactionStatus() |
59 | 59 | { |
60 | - if ( $this->getTransaction() && $this->getAuthorised() && $this->getResponseText() === 'APPROVED' ) { |
|
60 | + if ($this->getTransaction() && $this->getAuthorised() && $this->getResponseText() === 'APPROVED') { |
|
61 | 61 | return static::STATUS_COMPLETED; |
62 | 62 | } |
63 | 63 |
@@ -23,8 +23,8 @@ |
||
23 | 23 | |
24 | 24 | public function getRedirectUrl() |
25 | 25 | { |
26 | - foreach ( $this->data->links ?? [] as $link ) { |
|
27 | - if ( $link->rel === 'hpp' ) { |
|
26 | + foreach ($this->data->links ?? [] as $link) { |
|
27 | + if ($link->rel === 'hpp') { |
|
28 | 28 | return $link->href; |
29 | 29 | } |
30 | 30 | } |