24 private $paymentRepository;
29 private $orderRepository;
41 $this->paymentRepository = $paymentRepository;
51 $this->isGrandTotalEnoughToRefund(
$entity) &&
52 $this->isPaymentAllowRefund(
$entity)
57 return [
__(
'We can\'t create creditmemo for the invoice.')];
81 return abs(
$entity->getBaseGrandTotal() -
$entity->getBaseTotalRefunded()) >= .0001;
92 $method->canRefundPartialPerInvoice() &&
101 private function canFullRefund(InvoiceInterface
$invoice, MethodInterface
$method)
__construct(OrderPaymentRepositoryInterface $paymentRepository, OrderRepositoryInterface $orderRepository)