Closed kevindewalt closed 9 years ago
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.
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