|
@@ -85,7 +85,7 @@ discard block |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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
|
} |