File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed
Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change 1313
1414namespace Sylius \PayPalPlugin \Controller ;
1515
16- use Sylius \Component \Core \Model \OrderInterface ;
1716use Sylius \Component \Core \Repository \OrderRepositoryInterface ;
1817use Sylius \PayPalPlugin \Provider \FlashBagProvider ;
1918use Sylius \PayPalPlugin \Provider \PaymentProviderInterface ;
@@ -46,19 +45,6 @@ public function __construct(
4645
4746 public function __invoke (Request $ request ): Response
4847 {
49- /**
50- * @var string $content
51- */
52- $ content = $ request ->getContent ();
53-
54- $ content = (array ) json_decode ($ content , true );
55-
56- $ payment = $ this ->paymentProvider ->getByPayPalOrderId ((string ) $ content ['payPalOrderId ' ]);
57-
58- /** @var OrderInterface $order */
59- $ order = $ payment ->getOrder ();
60- $ this ->orderRepository ->remove ($ order );
61-
6248 FlashBagProvider::getFlashBag ($ this ->flashBagOrRequestStack )->add ('success ' , 'sylius.pay_pal.order_cancelled ' );
6349
6450 return new Response ('' , Response::HTTP_NO_CONTENT );
You can’t perform that action at this time.
0 commit comments