I am working on a new payment method for shop and I am stuck in the method can refund. In this function I would need to find a way to get the order id of the invoice to refund. How should I proceed?
class Company_Module_Model_Standard extends Mage_Payment_Model_Method_Abstract
{
(...)
public function canRefund() // we need a way to get the orderId
{
$client = $this->_getCLient();
$client->loadOrder($orderId); // <------ here I would need the order id or increment id
$ret = $client->canRefund();
return $ret;
}
(...)
}
I hope you can help me.
Try this: