From cc422752bcfc9f364fd429150c0aa4ef263e0af6 Mon Sep 17 00:00:00 2001 From: cmorenov1402 Date: Wed, 7 May 2025 11:27:32 +0200 Subject: [PATCH] Update webhook route --- src/Controller/GatewaysController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/GatewaysController.php b/src/Controller/GatewaysController.php index 9ef8c5e..d0d0830 100644 --- a/src/Controller/GatewaysController.php +++ b/src/Controller/GatewaysController.php @@ -29,11 +29,11 @@ class GatewaysController extends AbstractController return $gateway->handleRedirect($request); } - #[Route('/gateway_webhooks', name: self::WEBHOOKS)] - public function handleWebhook(Request $request): Response + #[Route('/gateway_webhooks/{gateway}', name: self::WEBHOOKS)] + public function handleWebhook(Request $request, string $gateway): Response { - $gateway = $this->gatewayLocator->get($request->query->get('gateway')); + $handler = $this->gatewayLocator->get($gateway); - return $gateway->handleWebhook($request); + return $handler->handleWebhook($request); } }