From ea1a373a9bfc18dc8b49e4a999f0367e9a4a8acb Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sat, 17 Dec 2022 07:36:13 +0100 Subject: [PATCH] Fixes for tokenbillling --- app/PaymentDrivers/Stripe/Charge.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/PaymentDrivers/Stripe/Charge.php b/app/PaymentDrivers/Stripe/Charge.php index ee09ba95fb57..78a0200102f2 100644 --- a/app/PaymentDrivers/Stripe/Charge.php +++ b/app/PaymentDrivers/Stripe/Charge.php @@ -89,6 +89,9 @@ class Charge if ($cgt->gateway_type_id == GatewayType::SEPA) { $data['payment_method_types'] = ['sepa_debit']; } + if ($cgt->gateway_type_id == GatewayType::BACS) { + $data['payment_method_types'] = ['bacs_debit']; + } /* Should improve token billing with client not present */ if (!auth()->guard('contact')->check()) { @@ -158,7 +161,7 @@ class Charge $status = Payment::STATUS_COMPLETED; } - + if(!in_array($response?->status, ['succeeded', 'processing'])){ $this->stripe->processInternallyFailedPayment($this->stripe, new \Exception('Auto billing failed.',400)); }