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

Stripe checkout: handle events #8016

Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Mar 15, 2021

  • register payment failed in our handled events
  • return unhandled event if it's not known
  • remove one level of indentation

Based on #8002

We had this event registered but it wasn't added to the list of handled events.
We were returning `None` in some cases and that makes Django to return a 500.
@humitos humitos requested a review from a team March 15, 2021 10:16
)
stripe_customer = event.data.object.customer

if event.type == self.EVENT_CHECKOUT_COMPLETED:
Copy link
Member Author

Choose a reason for hiding this comment

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

All this code is the same. I only remove one level of indentation.

@ericholscher ericholscher merged commit 45d8ad6 into humitos/remove-old-payment-code Mar 15, 2021
@ericholscher ericholscher deleted the humitos/stripe-webhook-fixes branch March 15, 2021 16:50
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.

None yet

2 participants