RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.
http://railsapps.github.io/rails-stripe-membership-saas
1.14k stars 232 forks source link

Yearly subscriptions and Rails 4 #113

Closed drewpotter closed 9 years ago

drewpotter commented 9 years ago

Hello,

I was wondering if this solution works for yearly subscriptions?

Also, I am using Rails 4 and wondered if I could use this in my existing Rails 4 App?

Thanks,

Drew

DanielKehoe commented 9 years ago

Stripe allows you to set the billing interval as yearly if you wish. The current version of the app was written for Rails 3.2. I advise to wait for an updated version (which will use the Payola gem), coming within the month.

albertpak commented 9 years ago

Im in a same boat right now, tried to "morph" it to be used with Rails 4.2, and running into an issue when `update_stripe' method raises an error that stripe_token is not present...after logging all vars and responses and what gets submitted - do see that stripe_token gets assigned to a user[stripe_token], but method doesn't see it...

@DanielKehoe any idea what could be causing it?

albertpak commented 9 years ago

Looking at the logs and what gets submitted, I do see that user[stripe_token] is there, but this line keeps raising issue:

...
if !stripe_token.present?
  raise "Stripe token not present. Can't create account."
end
...

user_create_error

albertpak commented 9 years ago

Nvm, fixed the error - was an error on my part - forgot that in new Devise had to allow Stripe token parameter for Devise to handle. @DanielKehoe started reading your other tutorial and it dawned upon me.

Been looking into Payola gem also and looking forward to your implementation of it.

DanielKehoe commented 9 years ago

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