Merge pull request #6036 from beganovich/v5-1506-generic-error-page

Throw PaymentFailed (generic) exception
This commit is contained in:
Benjamin Beganović 2021-06-15 18:53:37 +02:00 committed by GitHub
commit e377953f0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}
}