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-payment
Gateway
Helper
ContextHelper.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Gateway\Helper
;
7
8
use
Magento\Payment\Model\InfoInterface
;
9
17
class
ContextHelper
18
{
26
public
static
function
assertOrderPayment
(
InfoInterface
$paymentInfo
)
27
{
28
if
(!
$paymentInfo
instanceof \
Magento
\Sales\Api\Data\OrderPaymentInterface) {
29
throw
new \LogicException(
'Order payment should be provided.'
);
30
}
31
}
32
40
public
static
function
assertQuotePayment
(
InfoInterface
$paymentInfo
)
41
{
42
if
(!
$paymentInfo
instanceof \
Magento
\Quote\Api\Data\PaymentInterface) {
43
throw
new \LogicException(
'Quote payment should be provided.'
);
44
}
45
}
46
}
$paymentInfo
$paymentInfo
Definition:
payment_info.php:10
Magento\Payment\Gateway\Helper
Definition:
ContextHelper.php:6
Magento\Payment\Gateway\Helper\ContextHelper
Definition:
ContextHelper.php:17
Magento
Magento\Payment\Gateway\Helper\ContextHelper\assertQuotePayment
static assertQuotePayment(InfoInterface $paymentInfo)
Definition:
ContextHelper.php:40
Magento\Payment\Model\InfoInterface
Definition:
InfoInterface.php:14
Magento\Payment\Gateway\Helper\ContextHelper\assertOrderPayment
static assertOrderPayment(InfoInterface $paymentInfo)
Definition:
ContextHelper.php:26