diff --git a/app/Http/Controllers/ClientPortal/PaymentMethodController.php b/app/Http/Controllers/ClientPortal/PaymentMethodController.php index 97b9a0d3d889..403fec5f848b 100644 --- a/app/Http/Controllers/ClientPortal/PaymentMethodController.php +++ b/app/Http/Controllers/ClientPortal/PaymentMethodController.php @@ -15,6 +15,7 @@ namespace App\Http\Controllers\ClientPortal; use App\Events\Payment\Methods\MethodDeleted; use App\Http\Controllers\Controller; use App\Http\Requests\ClientPortal\PaymentMethod\CreatePaymentMethodRequest; +use App\Http\Requests\ClientPortal\PaymentMethod\VerifyPaymentMethodRequest; use App\Http\Requests\Request; use App\Models\ClientGatewayToken; use App\Models\GatewayType; diff --git a/app/PaymentDrivers/Stripe/BACS.php b/app/PaymentDrivers/Stripe/BACS.php index bc2494ab2b98..20060830d50e 100644 --- a/app/PaymentDrivers/Stripe/BACS.php +++ b/app/PaymentDrivers/Stripe/BACS.php @@ -29,6 +29,7 @@ use App\Utils\Number; class BACS { public $stripe; + public $session; public function __construct(StripePaymentDriver $stripe) { @@ -45,14 +46,16 @@ class BACS 'success_url' => $this->buildReturnUrl(), 'cancel_url' => 'https://example.com/cancel', ]); + $session = $data['session']; return render('gateways.stripe.bacs.authorize', $data); } private function buildReturnUrl(): string { - return route('client.payments.response', [ + return route('client.payments.store', [ 'company_gateway_id' => $this->stripe->company_gateway->id, 'payment_method_id' => GatewayType::BACS, + 'session_id' => "{CHECKOUT_SESSION_ID}", ]); }