@@ -150,35 +150,35 @@ discard block |
||
| 150 | 150 | $data['storeCard'] = (bool) $this->getStoreCard() ?? false; |
| 151 | 151 | $data['callbackUrls'] = []; |
| 152 | 152 | |
| 153 | - if ( is_array($this->getPaymentMethods()) ) { |
|
| 153 | + if (is_array($this->getPaymentMethods())) { |
|
| 154 | 154 | $data['methods'] = $this->getPaymentMethods(); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - if ( is_array($this->getCardTypes()) ) { |
|
| 157 | + if (is_array($this->getCardTypes())) { |
|
| 158 | 158 | $data['cardTypes'] = $this->getCardTypes(); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - if ( is_array($this->getMetadata()) ) { |
|
| 161 | + if (is_array($this->getMetadata())) { |
|
| 162 | 162 | $data['metaData'] = $this->getMetadata(); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if ( $this->getMerchantReference() ) { |
|
| 165 | + if ($this->getMerchantReference()) { |
|
| 166 | 166 | $data['merchantReference'] = $this->getMerchantReference(); |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | - if ( $this->getReturnUrl() ) { |
|
| 169 | + if ($this->getReturnUrl()) { |
|
| 170 | 170 | $data['callbackUrls']['approved'] = $this->getReturnUrl(); |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - if ( $this->getDeclineUrl() ) { |
|
| 173 | + if ($this->getDeclineUrl()) { |
|
| 174 | 174 | $data['callbackUrls']['declined'] = $this->getDeclineUrl(); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - if ( $this->getCancelUrl() ) { |
|
| 177 | + if ($this->getCancelUrl()) { |
|
| 178 | 178 | $data['callbackUrls']['cancelled'] = $this->getCancelUrl(); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - if ( $this->getNotifyUrl() ) { |
|
| 181 | + if ($this->getNotifyUrl()) { |
|
| 182 | 182 | $data['notificationUrl'] = $this->getNotifyUrl(); |
| 183 | 183 | } |
| 184 | 184 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $headers = [ |
| 191 | 191 | 'Accept' => 'application/json', |
| 192 | 192 | 'Content-Type' => 'application/json', |
| 193 | - 'Authorization' => 'Basic ' . $this->getAuthorization() |
|
| 193 | + 'Authorization' => 'Basic '.$this->getAuthorization() |
|
| 194 | 194 | ]; |
| 195 | 195 | |
| 196 | 196 | $httpResponse = $this->httpClient->request('POST', $this->getEndpoint('sessions'), $headers, json_encode($data)); |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | */ |
| 215 | 215 | protected function getEndpoint($path = '') |
| 216 | 216 | { |
| 217 | - return ($this->getTestMode() ? self::endpointTest : self::endpointLive) . '/' . $path; |
|
| 217 | + return ($this->getTestMode() ? self::endpointTest : self::endpointLive).'/'.$path; |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | protected function getAuthorization() |