| Current Path : /home/rtorresani/www/vendor/paypal/module-braintree-core/Gateway/Response/ |
| Current File : //home/rtorresani/www/vendor/paypal/module-braintree-core/Gateway/Response/RefundHandler.php |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace PayPal\Braintree\Gateway\Response;
use Magento\Sales\Model\Order\Payment;
class RefundHandler extends VoidHandler
{
/**
* Whether parent transaction should be closed
*
* @param Payment $orderPayment
* @return bool
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function shouldCloseParentTransaction(Payment $orderPayment): bool
{
return !(bool)$orderPayment->getCreditmemo()->getInvoice()->canRefund();
}
}