Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of syncing deleted customers #358

Merged
merged 4 commits into from Sep 21, 2017

Conversation

sprocket-9
Copy link
Contributor

What's this PR do?

Modifies deleted customer webhook to purge customer locally and not attempt to delete customer again on Stripe.

Modifies customer syncing actions and management command to handle situation where customer is deleted remotely but not locally.

Any background context you want to provide?

What ticket or issue # does this fix?

Closes #268

Definition of Done (check if considered and/or addressed):

  • Are all backwards incompatible changes documented in this PR?
  • Have all new dependencies been documented in this PR?
  • Has the appropriate documentation been updated (if applicable)?
  • Have you written tests to prove this change works (if applicable)?

@sprocket-9
Copy link
Contributor Author

@tasn used cherry pick on your commits and resubmitted this PR - does this look OK to you?

@tasn
Copy link
Contributor

tasn commented Sep 5, 2017

This looks great. Thank you.

Also, extra thank you for adding the tests to finally get this PR merged in!

Edit: forgot to mention, I'll now abandon my PR in favour of this one.

@sprocket-9
Copy link
Contributor Author

@tasn great! Learned a lot of new git skills doing this too 👍

@tasn
Copy link
Contributor

tasn commented Sep 5, 2017

I was going to explain to you how to do it, but since you said you were new to git, I thought it may be too complex.

Glad you managed to do it on your own and learn new tricks on the way. Git is a powerful tool, you can do very cool things with it.

if cu is None:
cu = customer.stripe_customer

if cu.get('deleted', False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small thing, but can you change to double-quotes to keep consistent with project style? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paltman np, done!

@sprocket-9
Copy link
Contributor Author

@paltman added a commit to use double quotes so this PR is good to go.

@paltman paltman merged commit 158948b into pinax:master Sep 21, 2017
@tasn
Copy link
Contributor

tasn commented Sep 22, 2017

Thanks everyone. Happy it's finally in!

@paltman paltman added this to the Samwise milestone Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sync_customers crashes for deleted customers
3 participants