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
Helper
Checkout.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Paypal\Helper
;
7
8
use
Magento\Sales\Model\Order
;
9
13
class
Checkout
14
{
18
protected
$session
;
19
23
public
function
__construct
(
24
\
Magento
\
Checkout
\Model\Session
$session
25
) {
26
$this->session =
$session
;
27
}
28
35
public
function
cancelCurrentOrder
($comment)
36
{
37
$order
= $this->session->getLastRealOrder();
38
if
(
$order
->getId() &&
$order
->getState() !=
Order::STATE_CANCELED
) {
39
$order
->registerCancellation($comment)->save();
40
return
true
;
41
}
42
return
false
;
43
}
44
50
public
function
restoreQuote
()
51
{
52
return
$this->session->restoreQuote();
53
}
54
}
Magento\Sales\Model\Order
Magento\Paypal\Helper\Checkout
Definition:
Checkout.php:13
$order
$order
Definition:
order.php:55
Magento\Sales\Model\Order\STATE_CANCELED
const STATE_CANCELED
Definition:
Order.php:71
Magento\Paypal\Helper\Checkout\$session
$session
Definition:
Checkout.php:18
Magento\Paypal\Helper\Checkout\cancelCurrentOrder
cancelCurrentOrder($comment)
Definition:
Checkout.php:35
Magento\Paypal\Helper
Definition:
DataTest.php:6
Magento
Magento\Paypal\Helper\Checkout\__construct
__construct(\Magento\Checkout\Model\Session $session)
Definition:
Checkout.php:23
Magento\Paypal\Helper\Checkout\restoreQuote
restoreQuote()
Definition:
Checkout.php:50