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

Yearly subscriptions and Rails 4

drewpotter opened this issue · comments

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

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.

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?

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

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.

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