Closed laurenierullo closed 9 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.
That was it. Thank you!
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.
coderawal, i will try to answer your questions:
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}"
Thanks Kathyonu, now it's clear.
There is a new version of this application for Rails 4.2 using the Payola gem.
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!