@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | return $this->gatewayFactory->build('CoinGate', [ |
| 26 | 26 | 'apiKey' => $this->credentials->getKey1(), |
| 27 | - ]); |
|
| 27 | + ]); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -14,6 +14,6 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function getSuccessResponseText(ServerRequestInterface $request): ?string |
| 16 | 16 | { |
| 17 | - return 'OK' . $request->getParsedBody()['InvId']; // https://docs.robokassa.ru/#1250 |
|
| 17 | + return 'OK'.$request->getParsedBody()['InvId']; // https://docs.robokassa.ru/#1250 |
|
| 18 | 18 | } |
| 19 | 19 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | throw new MerchantException('Response is not successful'); |
| 86 | 86 | } |
| 87 | 87 | } catch (Exception $exception) { |
| 88 | - throw new MerchantException('Failed to refund a card: ' . $exception->getMessage(), $exception->getCode(), $exception); |
|
| 88 | + throw new MerchantException('Failed to refund a card: '.$exception->getMessage(), $exception->getCode(), $exception); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | throw new MerchantException($response->getData()['message']); |
| 102 | 102 | } |
| 103 | 103 | } catch (Exception $exception) { |
| 104 | - throw new MerchantException('Failed to remove a card: ' . $exception->getMessage(), $exception->getCode(), $exception); |
|
| 104 | + throw new MerchantException('Failed to remove a card: '.$exception->getMessage(), $exception->getCode(), $exception); |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | 'confirm' => true, |
| 121 | 121 | ], $ignore3dSecure))->send(); |
| 122 | 122 | } catch (Exception $exception) { |
| 123 | - throw new MerchantException('Failed to charge a card: ' . $exception->getMessage(), $exception->getCode(), $exception); |
|
| 123 | + throw new MerchantException('Failed to charge a card: '.$exception->getMessage(), $exception->getCode(), $exception); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if ($response->isRedirect()) { |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | if (isset($response->getData()['error']['message']) || isset($response->getData()['last_payment_error']['message'])) { |
| 190 | 190 | $message = $response->getData()['error']['message'] ?? $response->getData()['last_payment_error']['message']; |
| 191 | - throw new MeaningfulForUserMerchantException("Failed to charge card:\n" . $message); |
|
| 191 | + throw new MeaningfulForUserMerchantException("Failed to charge card:\n".$message); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | throw new MerchantException('Failed to charge card'); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | 'capture_method' => 'manual' |
| 260 | 260 | ], $ignore3dSecure))->send(); |
| 261 | 261 | } catch (Exception $exception) { |
| 262 | - throw new MerchantException('Failed to authorize a payment card: ' . $exception->getMessage(), $exception->getCode(), $exception); |
|
| 262 | + throw new MerchantException('Failed to authorize a payment card: '.$exception->getMessage(), $exception->getCode(), $exception); |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | if ($response->isRedirect()) { |
@@ -301,10 +301,10 @@ discard block |
||
| 301 | 301 | ])->send(); |
| 302 | 302 | |
| 303 | 303 | if (!$response->isCancelled()) { |
| 304 | - throw new MerchantException('Payment has not been canceled, actual status: ' . $response->getStatus()); |
|
| 304 | + throw new MerchantException('Payment has not been canceled, actual status: '.$response->getStatus()); |
|
| 305 | 305 | } |
| 306 | 306 | } catch (Exception $exception) { |
| 307 | - throw new MerchantException('Failed to cancel a card authorization: ' . $exception->getMessage(), $exception->getCode(), $exception); |
|
| 307 | + throw new MerchantException('Failed to cancel a card authorization: '.$exception->getMessage(), $exception->getCode(), $exception); |
|
| 308 | 308 | } |
| 309 | 309 | } |
| 310 | 310 | } |