RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.

Home Page:http://railsapps.github.io/rails-stripe-membership-saas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot cancel trialing subsciption

kevindewalt opened this issue · comments

Suggest changing cancel_subscription to allow people to cancel trialing subscription:

def cancel_subscription
...
if (customer.subscription.status == 'active' or customer.subscription.status == 'trialing')
...
end

I'd highly recommend changing this. Currently if you used this project as a reference implementation and somebody cancelled during their trial period then they would still be eternally billed by Stripe but your app would have no information about them in the database.

I'm new to Github communication, so forgive me if it's out of etiquette to basically say "+1," but I agree that this is a pretty big issue for apps that choose to allow trial periods.

I have an app in production that almost continued charging an early customer.

Inserting the modified condition suggested by @kevindewalt appears to fix the problem for me.

There is a new version of this application for Rails 4.2 using the Payola gem.