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
Plugin
ValidatorCanInvoice.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Paypal\Plugin
;
9
10
use
Magento\Framework\Exception\LocalizedException
;
11
use
Magento\Paypal\Model\Adminhtml\Express
;
12
use
Magento\Sales\Api\Data\OrderInterface
;
13
use
Magento\Sales\Model\Order\Validation\CanInvoice
;
14
19
class
ValidatorCanInvoice
20
{
24
private
$express;
25
31
public
function
__construct
(
Express
$express)
32
{
33
$this->express = $express;
34
}
35
46
public
function
afterValidate
(
CanInvoice
$subject, array
$result
,
OrderInterface
$order
): array
47
{
48
if
($this->express->isOrderAuthorizationAllowed(
$order
->getPayment())) {
49
$result
[] =
__
(
'An invoice cannot be created when none of authorization transactions available.'
);
50
}
51
52
return
$result
;
53
}
54
}
Magento\Paypal\Plugin\ValidatorCanInvoice\afterValidate
afterValidate(CanInvoice $subject, array $result, OrderInterface $order)
Definition:
ValidatorCanInvoice.php:46
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
$order
$order
Definition:
order.php:55
__
__()
Definition:
__.php:13
Magento\Sales\Api\Data\OrderInterface
Definition:
OrderInterface.php:17
Magento\Paypal\Plugin
Definition:
OrderCanInvoice.php:8
Magento\Paypal\Model\Adminhtml\Express
Definition:
Express.php:41
Magento\Paypal\Plugin\ValidatorCanInvoice
Definition:
ValidatorCanInvoice.php:19
Magento\Paypal\Plugin\ValidatorCanInvoice\__construct
__construct(Express $express)
Definition:
ValidatorCanInvoice.php:31
Magento\Sales\Model\Order\Validation\CanInvoice
Definition:
CanInvoice.php:15