I'm new to rails and trying to get the Billing w/ Stripe RailsCast up and going (http://railscasts.com/episodes/288-billing-with-stripe) . I am cloned the project and built the project from the saas-after directory (https://github.com/railscasts/288-billing-with-stripe).
I then added my stripe test credentials in config/initalizers/stripe.rb , and added the subscriptions to my stripe account. I also built the rails app:
bundle
rake db:setup
rails s
When I enter a valid Stripe test card i.e. 4242424242424242 I'm still getting validation issues. Error is: "There was a problem with your credit card." Same error I would get if i gave a bad credit card i.e. 123 . What am I missing to get the example up?
Look at
models/subscription.rb
. This is where this validation error is added. Looks like Stripe didn't like the request you sent. Why don't you try to debug it by printing the error?(If you use pry-debugger this would be a good time to put a
binding.pry
statement in where theputs e
is currently ;) ).