@@ -91,15 +91,15 @@ discard block |
||
91 | 91 | 'callbackUrl' => $this->settings->callbackUrl, |
92 | 92 | ]; |
93 | 93 | |
94 | - if (! is_null($basketDetailsDto = $this->invoice->getDetail('basketDetailsDto'))) { |
|
94 | + if (!is_null($basketDetailsDto = $this->invoice->getDetail('basketDetailsDto'))) { |
|
95 | 95 | $data['basketDetailsDto'] = $basketDetailsDto; |
96 | 96 | } |
97 | 97 | |
98 | - if (! is_null($preferredGateway = $this->invoice->getDetail('preferredGateway'))) { |
|
98 | + if (!is_null($preferredGateway = $this->invoice->getDetail('preferredGateway'))) { |
|
99 | 99 | $data['preferredGateway'] = $preferredGateway; |
100 | 100 | } |
101 | 101 | |
102 | - if (! is_null($splitDetailsList = $this->invoice->getDetail('splitDetailsList'))) { |
|
102 | + if (!is_null($splitDetailsList = $this->invoice->getDetail('splitDetailsList'))) { |
|
103 | 103 | $data['splitDetailsList'] = $splitDetailsList; |
104 | 104 | } |
105 | 105 | |
@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | ->client |
113 | 113 | ->request( |
114 | 114 | 'POST', |
115 | - $this->settings->apiPaymentUrl . self::PURCHASE_URL, |
|
115 | + $this->settings->apiPaymentUrl.self::PURCHASE_URL, |
|
116 | 116 | [ |
117 | 117 | RequestOptions::BODY => json_encode($data), |
118 | 118 | RequestOptions::QUERY => ['type' => $digipayType], |
119 | 119 | RequestOptions::HEADERS => [ |
120 | 120 | 'Agent' => $this->invoice->getDetail('agent') ?? 'WEB', |
121 | 121 | 'Content-Type' => 'application/json', |
122 | - 'Authorization' => 'Bearer ' . $this->oauthToken, |
|
122 | + 'Authorization' => 'Bearer '.$this->oauthToken, |
|
123 | 123 | 'Digipay-Version' => self::VERSION, |
124 | 124 | ], |
125 | 125 | RequestOptions::HTTP_ERRORS => false, |
@@ -159,12 +159,12 @@ discard block |
||
159 | 159 | |
160 | 160 | $response = $this->client->request( |
161 | 161 | 'POST', |
162 | - $this->settings->apiPaymentUrl . self::VERIFY_URL . $tracingId, |
|
162 | + $this->settings->apiPaymentUrl.self::VERIFY_URL.$tracingId, |
|
163 | 163 | [ |
164 | 164 | RequestOptions::QUERY => ['type' => $digipayTicketType], |
165 | 165 | RequestOptions::HEADERS => [ |
166 | 166 | 'Accept' => 'application/json', |
167 | - 'Authorization' => 'Bearer ' . $this->oauthToken, |
|
167 | + 'Authorization' => 'Bearer '.$this->oauthToken, |
|
168 | 168 | ], |
169 | 169 | RequestOptions::HTTP_ERRORS => false, |
170 | 170 | ] |
@@ -189,10 +189,10 @@ discard block |
||
189 | 189 | ->client |
190 | 190 | ->request( |
191 | 191 | 'POST', |
192 | - $this->settings->apiPaymentUrl . self::OAUTH_URL, |
|
192 | + $this->settings->apiPaymentUrl.self::OAUTH_URL, |
|
193 | 193 | [ |
194 | 194 | RequestOptions::HEADERS => [ |
195 | - 'Authorization' => 'Basic ' . base64_encode("{$this->settings->client_id}:{$this->settings->client_secret}"), |
|
195 | + 'Authorization' => 'Basic '.base64_encode("{$this->settings->client_id}:{$this->settings->client_secret}"), |
|
196 | 196 | ], |
197 | 197 | RequestOptions::MULTIPART => [ |
198 | 198 | [ |
@@ -251,13 +251,13 @@ discard block |
||
251 | 251 | ->client |
252 | 252 | ->request( |
253 | 253 | 'POST', |
254 | - $this->settings->apiPaymentUrl . self::REVERSE_URL, |
|
254 | + $this->settings->apiPaymentUrl.self::REVERSE_URL, |
|
255 | 255 | [ |
256 | 256 | RequestOptions::BODY => json_encode($data), |
257 | 257 | RequestOptions::QUERY => ['type' => $digipayTicketType], |
258 | 258 | RequestOptions::HEADERS => [ |
259 | 259 | 'Content-Type' => 'application/json;charset=UTF-8', |
260 | - 'Authorization' => 'Bearer ' . $this->oauthToken, |
|
260 | + 'Authorization' => 'Bearer '.$this->oauthToken, |
|
261 | 261 | ], |
262 | 262 | RequestOptions::HTTP_ERRORS => false, |
263 | 263 | ] |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | throw new PurchaseFailedException('"type" is required for this method.'); |
285 | 285 | } |
286 | 286 | |
287 | - if (! in_array($type, [5, 13])) { |
|
287 | + if (!in_array($type, [5, 13])) { |
|
288 | 288 | throw new PurchaseFailedException('This method is not supported for this type.'); |
289 | 289 | } |
290 | 290 | |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | throw new PurchaseFailedException('"deliveryDate" is required for this method.'); |
297 | 297 | } |
298 | 298 | |
299 | - if (! DateTime::createFromFormat('Y-m-d', $deliveryDate)) { |
|
299 | + if (!DateTime::createFromFormat('Y-m-d', $deliveryDate)) { |
|
300 | 300 | throw new PurchaseFailedException('"deliveryDate" must be a valid date with format Y-m-d.'); |
301 | 301 | } |
302 | 302 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | throw new PurchaseFailedException('"products" is required for this method.'); |
309 | 309 | } |
310 | 310 | |
311 | - if (! is_array($products)) { |
|
311 | + if (!is_array($products)) { |
|
312 | 312 | throw new PurchaseFailedException('"products" must be an array.'); |
313 | 313 | } |
314 | 314 | |
@@ -323,13 +323,13 @@ discard block |
||
323 | 323 | ->client |
324 | 324 | ->request( |
325 | 325 | 'POST', |
326 | - $this->settings->apiPaymentUrl . self::DELIVER_URL, |
|
326 | + $this->settings->apiPaymentUrl.self::DELIVER_URL, |
|
327 | 327 | [ |
328 | 328 | RequestOptions::BODY => json_encode($data), |
329 | 329 | RequestOptions::QUERY => ['type' => $type], |
330 | 330 | RequestOptions::HEADERS => [ |
331 | 331 | 'Content-Type' => 'application/json;charset=UTF-8', |
332 | - 'Authorization' => 'Bearer ' . $this->oauthToken, |
|
332 | + 'Authorization' => 'Bearer '.$this->oauthToken, |
|
333 | 333 | ], |
334 | 334 | RequestOptions::HTTP_ERRORS => false, |
335 | 335 | ] |
@@ -349,11 +349,11 @@ discard block |
||
349 | 349 | { |
350 | 350 | $response = $this->client->request( |
351 | 351 | 'POST', |
352 | - $this->settings->apiPaymentUrl . self::REFUNDS_CONFIG, |
|
352 | + $this->settings->apiPaymentUrl.self::REFUNDS_CONFIG, |
|
353 | 353 | [ |
354 | 354 | RequestOptions::HEADERS => [ |
355 | 355 | 'Accept' => 'application/json', |
356 | - 'Authorization' => 'Bearer ' . $this->oauthToken, |
|
356 | + 'Authorization' => 'Bearer '.$this->oauthToken, |
|
357 | 357 | ], |
358 | 358 | RequestOptions::HTTP_ERRORS => false, |
359 | 359 | ] |
@@ -399,13 +399,13 @@ discard block |
||
399 | 399 | ->client |
400 | 400 | ->request( |
401 | 401 | 'POST', |
402 | - $this->settings->apiPaymentUrl . self::REFUNDS_REQUEST, |
|
402 | + $this->settings->apiPaymentUrl.self::REFUNDS_REQUEST, |
|
403 | 403 | [ |
404 | 404 | RequestOptions::BODY => json_encode($data), |
405 | 405 | RequestOptions::QUERY => ['type' => $type], |
406 | 406 | RequestOptions::HEADERS => [ |
407 | 407 | 'Content-Type' => 'application/json;charset=UTF-8', |
408 | - 'Authorization' => 'Bearer ' . $this->oauthToken, |
|
408 | + 'Authorization' => 'Bearer '.$this->oauthToken, |
|
409 | 409 | ], |
410 | 410 | RequestOptions::HTTP_ERRORS => false, |
411 | 411 | ] |