From 813206552d9a96f2b0f73d7a6f08e5023454ff48 Mon Sep 17 00:00:00 2001 From: SirDomin Date: Tue, 27 Oct 2020 11:22:50 +0100 Subject: [PATCH] removed unused service --- .../CancelPayPalCheckoutPaymentAction.php | 43 ------------------- src/Resources/config/services/controller.xml | 5 --- src/Resources/config/shop_routing.yaml | 6 --- 3 files changed, 54 deletions(-) delete mode 100644 src/Controller/CancelPayPalCheckoutPaymentAction.php diff --git a/src/Controller/CancelPayPalCheckoutPaymentAction.php b/src/Controller/CancelPayPalCheckoutPaymentAction.php deleted file mode 100644 index 523db726..00000000 --- a/src/Controller/CancelPayPalCheckoutPaymentAction.php +++ /dev/null @@ -1,43 +0,0 @@ -paymentProvider = $paymentProvider; - $this->paymentStateManager = $paymentStateManager; - } - - public function __invoke(Request $request): Response - { - $content = (array) json_decode((string) $request->getContent(false), true); - - $payment = $this->paymentProvider->getByPayPalOrderId((string) $content['payPalOrderId']); - - /** @var FlashBagInterface $flashBag */ - $flashBag = $request->getSession()->getBag('flashes'); - $flashBag->add('error', 'sylius.pay_pal.something_went_wrong'); - - $this->paymentStateManager->cancel($payment); - - return new Response('', Response::HTTP_NO_CONTENT); - } -} diff --git a/src/Resources/config/services/controller.xml b/src/Resources/config/services/controller.xml index b10f3c3f..dd8eb04f 100644 --- a/src/Resources/config/services/controller.xml +++ b/src/Resources/config/services/controller.xml @@ -25,11 +25,6 @@ - - - - - diff --git a/src/Resources/config/shop_routing.yaml b/src/Resources/config/shop_routing.yaml index 7bccdda7..50201335 100644 --- a/src/Resources/config/shop_routing.yaml +++ b/src/Resources/config/shop_routing.yaml @@ -110,12 +110,6 @@ sylius_paypal_plugin_cancel_payment: defaults: _controller: Sylius\PayPalPlugin\Controller\CancelPayPalPaymentAction -sylius_paypal_plugin_cancel_checkout_payment: - path: /cancel-pay-pal-checkout-payment - methods: [POST] - defaults: - _controller: Sylius\PayPalPlugin\Controller\CancelPayPalCheckoutPaymentAction - sylius_paypal_plugin_payment_error: path: /pay-pal-payment-error methods: [POST]