-
Notifications
You must be signed in to change notification settings - Fork 188
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
Issue canceling subscription on stripe's website - leaves plan_id in db to make the subscription appear active. #178
Comments
can you please point a webhook to Koudoku should then handle this via this code: https://github.com/andrewculver/koudoku/blob/master/config/initializers/stripe_event.rb#L22 If not, please add a |
@yas4891 any idea of what that webhook should look like? I have a similar problem and in my routes.rb file I have this, and it obviously isn't working. Any help is greatly appreciated! |
@amloelxer Then you follow the instructions here: https://github.com/andrewculver/koudoku#webhooks If you need further help, let me know! |
@yas4891 ahh that makes a lot more sense. I added the webhook of |
You should see that from the logs of your webserver. On Heroku you can
install Papertrail
Cheers,
Christoph
…On Tue, Jul 25, 2017 at 11:48 PM, Alexander Moller ***@***.*** > wrote:
@yas4891 <https://github.com/yas4891> ahh that makes a lot more sense. I
added the webhook of 'https://www.mywebsite.com/koudoku/webhooks` and got
a success on the stripe side, but still have the active subscription in my
database. Is there anyway to log that Koudoku has indeed received the hook?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#178 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABOUaD4hwZtHyt55kPG-LVPKffg6u_zpks5sRj-jgaJpZM4OEHUS>
.
|
@yas4891 thanks so much for your help! Sorry for all the novice questions. I'm new to web dev |
@yas4891 one more question. When I respond to the webhook that cancels the payment (which I canceled from the stripe dashboard), I try to set my local subscription |
Use `update_attribute :plan_id, nil` instead
Cheers,
Christoph
…On Wed, Jul 26, 2017 at 11:09 PM, Alexander Moller ***@***.*** > wrote:
@yas4891 <https://github.com/yas4891> one more question. When I respond
to the webhook that cancels the payment (which I canceled from the stripe
dashboard), I try to set my local subscription plan_id to nil and save
it. Unfortunately when I do this, it tries to send the update remotely as
well and obviously errors out because there is no active subscription on
the stripe servers/dashboard once I cancel it. Is there way to do an update
to my local db of subscriptions and not affect the ones in stripe?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#178 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABOUaAKvtpaR4nVJiPtGDXYOZr_WFtdIks5sR6rugaJpZM4OEHUS>
.
|
The issue:
When subscriptions are cancelled on Stripe's dashboard instead of in the rails app, Subscription in the database still has a plan_id present, which makes
This makes it appear on the views as if the subscription is still active. So when the user clicks cancel, there is an error. Then, I tried setting plan_id to nil manually in the console, and got the same error:
The text was updated successfully, but these errors were encountered: