Log in
Model

RefundInvoice

Magento\Sales\Model\Order\Validation\RefundInvoice

What it does

This class validates whether a refund can be created against an invoice in Magento 2.

It coordinates multiple validators to check if the order allows refunds, if the creditmemo data is valid, if item quantities are correct, and if the invoice can be refunded.

Developers use this during the creditmemo creation process to ensure all business rules are met before processing a refund.

Public Methods

  • validate()