integrallis / stripe_event

Stripe webhook integration for Rails applications.
https://rubygems.org/gems/stripe_event
MIT License
842 stars 105 forks source link

Got Completed 401 Unauthorized in 0ms #7

Closed dfguo closed 11 years ago

dfguo commented 11 years ago

not so sure why I got this eror on any event.

invisiblefunnel commented 11 years ago

A 401 is returned if the event can't be retrieved from Stripe. Can you provide any additional information?

dfguo commented 11 years ago

I am doing local dev testing using localtunnel. When I send test events to my endpoint. I got a 401. When I used: StripeEvent.event_retriever = Proc.new { |params| params }

it then gave me

StripeEvent::InvalidEventTypeError (Event type was not present for: {"controller"=>"stripe_event/webhook", "action"=>"event"}):

thanks.

invisiblefunnel commented 11 years ago

Is the Stripe.api_key value set? In rails console can you run Stripe::Event.all?

dfguo commented 11 years ago

yes, it gives me all the events.

invisiblefunnel commented 11 years ago

Can you post the request parameters from the server log? I will take a look tomorrow.

invisiblefunnel commented 11 years ago

@dfguo Still having problems?

dfguo commented 11 years ago

Sorry that I ended up writing my own solution. The request parameter is {"controller"=>"stripe_event/webhook", "action"=>"event"}):