public function updateBillingAgreementStatus(Mage_Payment_Model_Billing_AgreementAbstract $agreement)
    {
        Mage::dispatchEvent('adyen_payment_update_billing_agreement_status', array('agreement' => $agreement));

        $targetStatus = $agreement->getStatus();
        $adyenHelper = Mage::helper('adyen');

        if ($targetStatus == Mage_Sales_Model_Billing_Agreement::STATUS_CANCELED) {
            try {
                $this->_api()->disableRecurringContract(
                    $agreement->getReferenceId(),
                    $agreement->getCustomerReference(),
                    $agreement->getStoreId()
                );
            } catch (Adyen_Payment_Exception $e) {
                Mage::throwException(
                    $adyenHelper->__(
                        "Error while disabling Billing Agreement #%s: %s", $agreement->getReferenceId(),
                        $e->getMessage()
                    )
                );
            }
        } else {
            throw new Exception(
                Mage::helper('adyen')->__(
                    'Changing billing agreement status to "%s" not yet implemented.', $targetStatus
                )
            );
        }

        return $this;
    }