From 3ec81ea04bafa83a679f3e4fdeb7a5c8ad0f3ee2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 30 Oct 2022 19:52:32 +1100 Subject: [PATCH] Fixes for stripe autobilling --- app/PaymentDrivers/Stripe/Charge.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/PaymentDrivers/Stripe/Charge.php b/app/PaymentDrivers/Stripe/Charge.php index 3c927e544baa..eb6bc14558e3 100644 --- a/app/PaymentDrivers/Stripe/Charge.php +++ b/app/PaymentDrivers/Stripe/Charge.php @@ -137,6 +137,9 @@ class Charge return false; } + if($response?->status != 'succeeded') + $this->stripe->processInternallyFailedPayment($this->stripe, new \Exception('Auto billing failed.',400)); + if ($cgt->gateway_type_id == GatewayType::SEPA) { $payment_method_type = PaymentType::SEPA; $status = Payment::STATUS_PENDING;