Magento – Partial refund option missing (Qty to Refund)

creditmemopartial-paymentspayment-methodsrefund

In Magento, you have the option to do a partial refund, meaning only refund some of the products / qty from the original order. This option seems to be missing in my store. Normally it is possible when creating a Credit Memo to define the ‘Qty to Refund’ for each product on the order/invoice. But I’m missing the option/column of "Qty to Refund”

I did some research and it looks like my extension "TinyBrick/Authorizenetcim” is responsible for this. Its the only enabled Payment method.

I tried adding the code below to the TinyBrick/Authorizenetcim classes but that didn’t fix the issue

protected $_canCapturePartial = true;

Does anyone know how to fix this? Every help is much appreciated. Thank you

Best information I’ve found for this:

http://www.magentocommerce.com/boards/9401/viewthread/14698/P15/

http://www.magentocommerce.com/wiki/welcome_to_the_magento_user_s_guide/chapter_8#credit_memo_options

Best Answer

Here is the code that controls weather 'Qty to Refund' option is available.

public function canEditQty()
{
    if ($this->getCreditmemo()->getOrder()->getPayment()->canRefund()) {
        return $this->getCreditmemo()->getOrder()->getPayment()->canRefundPartialPerInvoice();
    }
    return true;
}

So payment method model must either declare:

$_canRefund = false;

Or

$_canRefund = true;
$_canRefundInvoicePartial = true;

Another thing to keep in mind is that availability of this option also depends on the type of the payment gateway. This option is always supported for offline, but sometimes won't be for online payment gateways. Reason for this is that sometimes they do not support partial refunds, or they were implemented poorly in Magento.

In case that refund is done online, payment method must implement following methods:

processBeforeRefund (optional)
refund
processCreditmemo (optional)
Related Topic