Log in
Model

RefundOperation

Magento\Sales\Model\Order\Creditmemo\RefundOperation

What it does

This class handles the business logic for processing refunds when a credit memo is created in Magento 2.

It updates the order's refund totals (taxes, shipping, discounts, adjustments) and triggers the payment gateway refund if online refund is enabled.

Developers use this class internally during the credit memo workflow to ensure order financials are accurately updated.

Public Methods

  • execute()