app/code/community/Adyen/Payment/Model/Observer.php
public function addCurrentInvoiceToPayment(Varien_Event_Observer $observer)
    {
        $invoice = $observer->getInvoice();
        $payment = $observer->getPayment();
        $payment->setCurrentInvoice($invoice);

        return $this;
    }
public function addCurrentInvoiceToPayment(Varien_Event_Observer $observer)
    {
        $invoice = $observer->getInvoice();
        $payment = $observer->getPayment();
        $payment->setCurrentInvoice($invoice);

        return $this;
    }
public function addCurrentInvoiceToPayment ( Varien_Event_Observer $ observer ) { $ invoice = $ observer -> getInvoice ( ) ; $ payment = $ observer -> getPayment ( ) ; $ payment -> setCurrentInvoice ( $ invoice ) ; return $ this ; }
Set current invoice to payment when capturing.

@param Varien_Event_Observer $observer
@return Adyen_Payment_Model_Observer $this
Set current invoice to payment when capturing .