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-quote
Model
GuestCart
GuestPaymentMethodManagement.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Quote\Model\GuestCart
;
7
8
use
Magento\Quote\Api\PaymentMethodManagementInterface
;
9
use
Magento\Quote\Api\GuestPaymentMethodManagementInterface
;
10
use
Magento\Quote\Model\QuoteIdMask
;
11
use Magento\Quote\Model\QuoteIdMaskFactory;
12
16
class
GuestPaymentMethodManagement
implements
GuestPaymentMethodManagementInterface
17
{
21
protected
$quoteIdMaskFactory
;
22
26
protected
$paymentMethodManagement
;
27
34
public
function
__construct
(
35
PaymentMethodManagementInterface
$paymentMethodManagement
,
36
QuoteIdMaskFactory
$quoteIdMaskFactory
37
) {
38
$this->quoteIdMaskFactory =
$quoteIdMaskFactory
;
39
$this->paymentMethodManagement =
$paymentMethodManagement
;
40
}
41
45
public
function
set
(
$cartId
,
\Magento\Quote\Api\Data\PaymentInterface
$method
)
46
{
48
$quoteIdMask
= $this->quoteIdMaskFactory->create()->load(
$cartId
,
'masked_id'
);
49
return
$this->paymentMethodManagement->set(
$quoteIdMask
->getQuoteId(),
$method
);
50
}
51
55
public
function
get
(
$cartId
)
56
{
58
$quoteIdMask
= $this->quoteIdMaskFactory->create()->load(
$cartId
,
'masked_id'
);
59
return
$this->paymentMethodManagement->get(
$quoteIdMask
->getQuoteId());
60
}
61
65
public
function
getList
(
$cartId
)
66
{
68
$quoteIdMask
= $this->quoteIdMaskFactory->create()->load(
$cartId
,
'masked_id'
);
69
return
$this->paymentMethodManagement->getList(
$quoteIdMask
->getQuoteId());
70
}
71
}
$quoteIdMask
$quoteIdMask
Definition:
quote_with_bundle_and_options_rollback.php:22
Magento\Quote\Model\GuestCart\GuestPaymentMethodManagement\$quoteIdMaskFactory
$quoteIdMaskFactory
Definition:
GuestPaymentMethodManagement.php:21
Magento\Quote\Model\GuestCart\GuestPaymentMethodManagement
Definition:
GuestPaymentMethodManagement.php:16
Magento\Quote\Api\GuestPaymentMethodManagementInterface
Definition:
GuestPaymentMethodManagementInterface.php:13
Magento\Quote\Model\GuestCart\GuestPaymentMethodManagement\$paymentMethodManagement
$paymentMethodManagement
Definition:
GuestPaymentMethodManagement.php:26
Magento\Quote\Model\GuestCart
Definition:
GuestBillingAddressManagement.php:6
Magento\Quote\Model\GuestCart\GuestPaymentMethodManagement\__construct
__construct(PaymentMethodManagementInterface $paymentMethodManagement, QuoteIdMaskFactory $quoteIdMaskFactory)
Definition:
GuestPaymentMethodManagement.php:34
$cartId
$cartId
Definition:
quote.php:22
Magento\Quote\Api\GuestPaymentMethodManagementInterface\getList
getList($cartId)
$method
$method
Definition:
info.phtml:13
Magento\Quote\Model\QuoteIdMask
Definition:
QuoteIdMask.php:15
Magento\Quote\Api\Data\PaymentInterface
Definition:
PaymentInterface.php:13
Magento\Quote\Api\PaymentMethodManagementInterface
Definition:
PaymentMethodManagementInterface.php:13