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

Receiving payment_succeeded event on subscription cancelation #171

Open
knagode opened this issue Sep 13, 2016 · 1 comment
Open

Receiving payment_succeeded event on subscription cancelation #171

knagode opened this issue Sep 13, 2016 · 1 comment

Comments

@knagode
Copy link

knagode commented Sep 13, 2016

When I cancel subscription I receive customer.subscription.deletedevent from Stripe which is OK.

After that I immediately receive invoice.payment_succeeded which even triggers error in code:

NoMethodError (undefined method `payment_succeeded' for nil:NilClass):
2016-09-13T16:30:27.066412+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/koudoku-1.2.4/config/initializers/stripe_event.rb:13:in `block (2 levels) in <top (required)>'

Why am I even getting payment succeeded event on cancelation?

@yas4891
Copy link
Collaborator

yas4891 commented Sep 13, 2016

@knagode
Thanks for reporting this.
It looks like Stripe creates a final invoice to settle the remaining balance. That's what's causing this error.

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

No branches or pull requests

2 participants