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-braintree
Gateway
Config
CanVoidHandler.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Braintree\Gateway\Config
;
7
8
use
Magento\Braintree\Gateway\SubjectReader
;
9
use
Magento\Payment\Gateway\Config\ValueHandlerInterface
;
10
use
Magento\Sales\Model\Order\Payment
;
11
12
class
CanVoidHandler
implements
ValueHandlerInterface
13
{
17
private
$subjectReader;
18
23
public
function
__construct
(
24
SubjectReader
$subjectReader
25
) {
26
$this->subjectReader = $subjectReader;
27
}
28
38
public
function
handle
(array $subject,
$storeId
=
null
)
39
{
40
$paymentDO = $this->subjectReader->readPayment($subject);
41
42
$payment
= $paymentDO->getPayment();
43
return
$payment
instanceof
Payment
&& !(bool)
$payment
->getAmountPaid();
44
}
45
}
$storeId
$storeId
Definition:
customer_review_with_rating.php:14
Magento\Braintree\Gateway\Config\CanVoidHandler\handle
handle(array $subject, $storeId=null)
Definition:
CanVoidHandler.php:38
$payment
$payment
Definition:
order.php:17
Magento\Braintree\Gateway\Config\CanVoidHandler
Definition:
CanVoidHandler.php:12
Magento\Braintree\Gateway\Config
Definition:
ConfigTest.php:7
Magento\Payment\Gateway\Config\ValueHandlerInterface
Definition:
ValueHandlerInterface.php:14
Magento\Sales\Model\Order\Payment
Definition:
RepositoryTest.php:6
Magento\Sales\Model\Order\Payment
Definition:
Payment.php:28
Magento\Braintree\Gateway\Config\CanVoidHandler\__construct
__construct(SubjectReader $subjectReader)
Definition:
CanVoidHandler.php:23
Magento\Braintree\Gateway\SubjectReader
Definition:
SubjectReader.php:16