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

Getting error when users attempt to sign up! #109

Closed laurenierullo closed 9 years ago

laurenierullo commented 10 years ago

I get this error:

No such plan: silver; a similar object exists in test mode, but a live mode key was used to make this request..

Please help!

Austio commented 10 years ago

Looks like you setup the test to use your production keys but it doesn't have the silver plan in it.

On Oct 15, 2014 7:00 PM, laurenierullo notifications@github.com wrote:

I get this error:

No such plan: silver; a similar object exists in test mode, but a live mode key was used to make this request..

Please help!

Reply to this email directly or view it on GitHubhttps://github.com/RailsApps/rails-stripe-membership-saas/issues/109.

laurenierullo commented 10 years ago

That was it. Thank you!

codemilan commented 10 years ago

Does this app doesn't create plan for customer. It's annoying, if customer needs to create there plan in their stripes dashboard. What if customer doesn't have sufficient amount during recurring periods ? Sorry if questions seems immature or senseless.

kathyonu commented 9 years ago

coderawal, i will try to answer your questions:

  1. the app does create the plan for the customer when they choose the plan they want to subscribe to, using the home page. the app does create the plans, so to speak, they are called roles.
  2. yes, the developer needs to go to stripe.com, and create their test plans, for their application to use.
  3. the user, the public person using your app on the net, does not do such a thing. they sign up on app.
  4. if customer/subscriber does not have sufficient funds in account during any recurring period, stripe.com will try again, according to the timetable you set, using your stripe dashboard. we have ours set so that after three attempts to charge the account, we stop trying and the customer sits in limbo .. we ourselves have not yet addressed the matter of having our one such customer do what is required to begin subscribing again .. which is what she will have to do. when we are ready, codes wise, we will ask her to arrive on our sign up page and sign up and we will both see what happens. also, you can know that the next evolution of rails-stripe-membership-saas will not use the 'roles' table, it will be much simplified by using enum as the holder of roles. If you follow the ongoing output of Daniel's apps and tutorials, you can see how he has changed the setting up of roles, thankfully. So look for enum in the next evolution coming soon. If you want to create customers, with their plans in place, so that you can easily work with them in development, i proffer our db/seeds.rb file from our working app, solely for use in development, it generates your users with their plans.

puts "ROLES" YAML.load(ENV['ROLES']).each do |role| Role.find_or_create_by(:name => role) puts 'role: ' << role end

puts "DEFAULT USERS" user = User.find_or_create_by(:email => ENV['ADMIN_EMAIL'].dup) do |user| user.name = ENV['ADMIN_NAME'].dup user.password = ENV['ADMIN_PASSWORD'].dup user.password_confirmation = ENV['ADMIN_PASSWORD'].dup end user.add_role :admin puts 'user: ' << user.name

user2 = User.find_or_create_by(:email => 'user2@example.com') do |user| user.name = 'Silver User' user.password = 'changemenow' user.password_confirmation = 'changemenow' end user2.add_role :silver puts 'user: ' << user.name

user3 = User.find_or_create_by(:email => 'user3@example.com') do |user| user.name = 'Gold User' user.password = 'changemenow' user.password_confirmation = 'changemenow' end user3.add_role :gold puts 'user: ' << user.name

user4 = User.find_or_create_by(:email => 'user4@example.com') do |user| user.name = 'Platinum User' user.password = 'changemenow' user.password_confirmation = 'changemenow' end user4.add_role :platinum puts 'user: ' << user.name

user5 = User.find_or_create_by(:email => 'user5@example.com') do |user| user.name = 'Visitor User' user.password = 'changemenow' user.password_confirmation = 'changemenow' end user5.add_role :visitor puts 'user: ' << user.name

puts "users: #{user2.name}, #{user3.name}, #{user4.name}, #{user5.name}"

codemilan commented 9 years ago

Thanks Kathyonu, now it's clear.

DanielKehoe commented 9 years ago

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