Magento Admin – Capture/Void/Refund Not Showing

paymentpayment-gateway

I have a custom payment plugin that so far has only authorize functionality.
This means that in my model I have only:

protected $_canAuthorize = true;
protected $_canCapture = false;
protected $_canRefund = false;
protected $_canVoid = false;

I can close the payment, but when I create the invoice I don't see any option for refund, void, capture. Is this related to the fact that all the others flags are set to false and that the functions are not implemented?

Best Answer

It seams straight forward to me. If the payment methods does not allow caprure, refund and void it seams normal not to have the options in the invoices.
But just to make sure, if you drill down in the code starting from Mage_Sales_Model_Order_Invoice::canVoid() you will find this line:

$canVoid = $this->getOrder()->getPayment()->canVoid($this);

that will get you to Mage_Sales_Model_Order_Payment::canVoid(Varien_Object $document) where you will find this line:

$this->_canVoidLookup = (bool)$this->getMethodInstance()->canVoid($document);

Going deeper you end up in Mage_Payment_Model_Method_Abstract::canVoid() that simply returns $this->_canVoid.
I didn't check, but I have a feeling that it's the same for capture and refund.