Log in
Model

RefundOrder

Magento\Sales\Model\Order\Validation\RefundOrder

What it does

This class validates whether a refund (credit memo) can be created for an order in Magento 2.

It checks if the order can be refunded, validates the credit memo quantities and totals, and validates individual refund items.

Developers use this when programmatically creating refunds to ensure all business rules are met before processing the credit memo.

Public Methods

  • validate()