From 3f729bedde62659305d1ef6836ff7003e402ba39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 15 Jun 2021 18:52:15 +0200 Subject: [PATCH] Throw PaymentFailed (generic) exception --- app/PaymentDrivers/StripePaymentDriver.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index d91b22413411..24351f37c25e 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -12,6 +12,7 @@ namespace App\PaymentDrivers; +use App\Exceptions\PaymentFailed; use App\Factory\PaymentFactory; use App\Http\Requests\Payments\PaymentWebhookRequest; use App\Http\Requests\Request; @@ -490,9 +491,7 @@ class StripePaymentDriver extends BaseDriver return PaymentMethod::retrieve($source, $this->stripe_connect_auth); } catch (ApiErrorException | Exception $e) { - - return $this->processInternallyFailedPayment($this, $e); - + throw new PaymentFailed($e->getMessage(), $e->getCode()); } }