From 8ca1b904d7f01b6624d16ffcf51c2e5fb8f618b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 31 May 2021 16:23:18 +0200 Subject: [PATCH] Refactor the redirect to specific route --- .../Gateways/Checkout3dsController.php | 24 +++++++++++++++++++ app/PaymentDrivers/CheckoutCom/CreditCard.php | 2 +- routes/web.php | 4 +++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 app/Http/Controllers/Gateways/Checkout3dsController.php diff --git a/app/Http/Controllers/Gateways/Checkout3dsController.php b/app/Http/Controllers/Gateways/Checkout3dsController.php new file mode 100644 index 000000000000..461db33e0603 --- /dev/null +++ b/app/Http/Controllers/Gateways/Checkout3dsController.php @@ -0,0 +1,24 @@ +all(); + } +} diff --git a/app/PaymentDrivers/CheckoutCom/CreditCard.php b/app/PaymentDrivers/CheckoutCom/CreditCard.php index 44ea6023b68e..b30e37ca7404 100644 --- a/app/PaymentDrivers/CheckoutCom/CreditCard.php +++ b/app/PaymentDrivers/CheckoutCom/CreditCard.php @@ -144,7 +144,7 @@ class CreditCard if ($this->checkout->client->currency()->code == 'EUR' || $this->checkout->company_gateway->getConfigField('threeds')) { $payment->{'3ds'} = ['enabled' => true]; - $payment->{'success_url'} = route('payment_webhook', [ + $payment->{'success_url'} = route('checkout.3ds_redirect', [ 'company_key' => $this->checkout->client->company->company_key, 'company_gateway_id' => $this->checkout->company_gateway->hashed_id, 'hash' => $this->checkout->payment_hash->hash, diff --git a/routes/web.php b/routes/web.php index af15b87590b9..d044435abd99 100644 --- a/routes/web.php +++ b/routes/web.php @@ -36,4 +36,6 @@ Route::group(['middleware' => ['url_db']], function () { }); Route::get('stripe/signup/{token}', 'StripeConnectController@initialize')->name('stripe_connect.initialization'); -Route::get('stripe/completed', 'StripeConnectController@completed')->name('stripe_connect.return'); \ No newline at end of file +Route::get('stripe/completed', 'StripeConnectController@completed')->name('stripe_connect.return'); + +Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Checkout3dsController@index')->name('checkout.3ds_redirect');