From 85261c107ae029979bbdc5f239ecbade033ed057 Mon Sep 17 00:00:00 2001 From: Tamara Date: Mon, 13 Jan 2025 14:50:28 +0100 Subject: [PATCH] Add express checkout payment endpoints AD4CR22I-20 --- .../Controller/FrontendProxyController.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Storefront/Controller/FrontendProxyController.php b/src/Storefront/Controller/FrontendProxyController.php index 3441d103..b9880af9 100644 --- a/src/Storefront/Controller/FrontendProxyController.php +++ b/src/Storefront/Controller/FrontendProxyController.php @@ -205,6 +205,36 @@ public function handlePayment(Request $request, SalesChannelContext $salesChanne return new JsonResponse($routeResponse->getObject()); } + #[Route( + '/adyen/proxy-checkout-order-express-product', + name: 'payment.adyen.proxy-checkout-order-express-product', + defaults: ['XmlHttpRequest' => true, 'csrf_protected' => false], + methods: ['POST'] + )] + public function checkoutOrderExpressProduct( + RequestDataBag $data, + SalesChannelContext $salesChannelContext + ): JsonResponse { + // TO DO + return new JsonResponse(); + } + + #[Route( + '/adyen/proxy-handle-payment-express-product', + name: 'payment.adyen.proxy-handle-payment-express-product', + defaults: ['XmlHttpRequest' => true, 'csrf_protected' => false], + methods: ['POST'] + )] + public function handlePaymentExpressProduct( + Request $request, + SalesChannelContext $salesChannelContext + ): JsonResponse { + // TO DO + $routeResponse = $this->handlePaymentMethodRoute->load($request, $salesChannelContext); + + return new JsonResponse($routeResponse->getObject()); + } + #[Route( '/adyen/proxy-finalize-transaction', name: 'payment.adyen.proxy-finalize-transaction',