diff --git a/pinax/stripe/actions/charges.py b/pinax/stripe/actions/charges.py index 375f8ffda..41fd1394a 100644 --- a/pinax/stripe/actions/charges.py +++ b/pinax/stripe/actions/charges.py @@ -160,7 +160,10 @@ def sync_charges_for_customer(customer): Args: customer: a pinax.stripe.models.Customer object """ - for charge in customer.stripe_customer.charges().data: + charges = stripe.Charge.list( + settings.PINAX_STRIPE_SECRET_KEY, + customer=customer.stripe_customer.stripe_id) + for charge in charges.data: sync_charge_from_stripe_data(charge) diff --git a/pinax/stripe/actions/invoices.py b/pinax/stripe/actions/invoices.py index 100b621c7..cf5b5743b 100644 --- a/pinax/stripe/actions/invoices.py +++ b/pinax/stripe/actions/invoices.py @@ -131,7 +131,10 @@ def sync_invoices_for_customer(customer): Args: customer: the customer for whom to synchronize all invoices """ - for invoice in customer.stripe_customer.invoices().data: + invoices = stripe.Invoice.list( + settings.PINAX_STRIPE_SECRET_KEY, + customer=customer.stripe_customer.stripe_id) + for invoice in invoices.data: sync_invoice_from_stripe_data(invoice, send_receipt=False)