Closed BobWalsh closed 9 years ago
@BobWalsh webhooks from Stripe are delivered via HTTP POSTs, which is why you are getting a missing route error with GET requests.
I understand that, but I think you missed the point: installed gem, used your config code in the stripe initalizer, opened the /stripe page. Expected to see: Started GET "/stripe" for 127.0.0.1 at ... Processing by StripeEvent::WebhookController#event as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
Instead, got the above error.
Is this tutorial https://tutorials.railsapps.org/tutorials/rails-stripe-membership-saas#stripe-push-notifications wrong?
Cheers, Bob
Ah, ok. Looks like that tutorial requires a login. Older versions (< 0.6.1) of stripe_event did respond to GET requests, but that was an oversight on my part. To confirm the setup of newer versions, run something like the following curl command:
$ curl -X POST -d'{"just":"a test"}' http://localhost:3000/stripe
EDIT: yes, it appears the tutorial is out of date
In a rails 4.1.6 (ruby 2.1.2) app using stripe_event 1.3.0, I'm getting
Started GET "/stripe" for 127.0.0.1 at 2014-10-13 11:30:55 -0700 ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
ActionController::RoutingError (No route matches [GET] ""): actionpack (4.1.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
call' actionpack (4.1.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call' . . . whenever I load http://localhost:3000/stripeIn rake routes, I see stripe_event_path has blank for HTTP verb.
This seems similar to https://github.com/integrallis/stripe_event/issues/13. Any idea how to fix?