protected function _updateExistingBillingAgreementsStatus($customerReference, $recurringReferencesList)
    {
        $billingAgreements = Mage::getResourceModel('adyen/billing_agreement_collection')
            ->addFieldToFilter('customer_id', $customerReference);

        foreach ($billingAgreements as $billingAgreement) {
            if (!in_array($billingAgreement->getReferenceId(), $recurringReferencesList)) {
                $billingAgreement->setStatus(Adyen_Payment_Model_Billing_Agreement::STATUS_CANCELED);
            } else {
                $billingAgreement->setStatus(Adyen_Payment_Model_Billing_Agreement::STATUS_ACTIVE);
            }

            $billingAgreement->save();
        }
    }