def send_receipt(cls, email, year):
Contact = apps.get_model('messaging', 'Contact')
Funding = apps.get_model('funding', 'Funding')
+ BillingAgreement = apps.get_model('paypal', 'BillingAgreement')
payments = []
try:
'amount': order.get_amount(),
})
+ for ba in BillingAgreement.objects.filter(schedule__email=email):
+ payments.extend(ba.get_donations(year))
+
fundings = Funding.objects.filter(
email=email,
payed_at__year=year