-
Notifications
You must be signed in to change notification settings - Fork 284
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
webhooks: customer.created should create local Customer #467
Comments
I think this could get handled in |
The tests are testing somehow the opposite though currently: https://github.com/pinax/pinax-stripe/blob/eb2a0557a1a1d2d860418eed084ca032d3301dd9/pinax/stripe/tests/test_webhooks.py#L346-L363 |
Affects other events also, e.g. customer.subscription.updated. |
@paltman @lukeburden |
If there's a customer, I think the local cache should know about it - so I'd be for properly adding a customer on receipt of a I also agree that if a customer is deleted on Stripe's side, this deletion should be reflected in the local cache. |
What do you think about doing this in |
That seems reasonable to me. We might need to see how it performs practically though? In one project I have, I currently get some weird race conditions around customer existence for source creation when making charges, which I haven't been able to work out yet. So I'm a little hesitant to create a race condition between:
But I think that should be addressed separately and that it's reasonable to create a customer record in the Unrelated: @blueyed, would you be open to jumping onto the Pinax Slack team? @paltman and I regularly expedite discussions with a quick chat there, and it'd be cool to pick your brains on a couple of other projects etc. |
@ticosax you'd be welcome to join the Slack team too, if you wanted! |
Just for reference, we use the following decorator, which could be adopted:
|
This also fixes some event fixtures. Fixes pinax#467.
This also fixes some event fixtures. Fixes pinax#467.
When you create a customer through the Stripe Dashboard, it sends the "customer.created" event, but pinax-stripe does not create the local Customer object then.
Do you agree?
The text was updated successfully, but these errors were encountered: