Skip to content

Commit

Permalink
Fix stripe/pinax-stripe versions mismatch bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bonidjukic committed Sep 9, 2018
1 parent a384400 commit 80e618e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pinax/stripe/actions/charges.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
5 changes: 4 additions & 1 deletion pinax/stripe/actions/invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 80e618e

Please sign in to comment.