Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-paypal
Controller
Hostedpro
Cancel.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Paypal\Controller\Hostedpro
;
8
9
use
Magento\Framework\App\Action\Context
;
10
use
Magento\Paypal\Helper\Checkout
;
11
12
class
Cancel
extends
\Magento\Framework\App\Action\Action
13
{
17
private
$checkoutHelper;
18
23
public
function
__construct
(
24
Context
$context,
25
Checkout
$checkoutHelper
26
) {
27
parent::__construct($context);
28
$this->checkoutHelper = $checkoutHelper;
29
}
30
36
public
function
execute
()
37
{
38
$this->checkoutHelper->cancelCurrentOrder(
''
);
39
$this->checkoutHelper->restoreQuote();
40
41
$this->
_redirect
(
'checkout'
, [
'_fragment'
=>
'payment'
]);
42
}
43
}
Magento\Framework\App\Action\Action\_redirect
_redirect($path, $arguments=[])
Definition:
Action.php:167
Magento\Paypal\Helper\Checkout
Definition:
Checkout.php:13
Magento\Paypal\Controller\Hostedpro
Definition:
Cancel.php:7
Magento\Paypal\Controller\Hostedpro\Cancel\execute
execute()
Definition:
Cancel.php:36
Magento\Paypal\Controller\Hostedpro\Cancel\__construct
__construct(Context $context, Checkout $checkoutHelper)
Definition:
Cancel.php:23
Magento\Framework\App\Action\Context
Definition:
Context.php:24
Magento\Paypal\Controller\Hostedpro\Cancel
Definition:
Cancel.php:12
Magento\Framework\App\Action\Action
Definition:
Action.php:25