1
我正在開發使用stripe_event gem的Rails應用程序(4.2.x)。我在開發模式下處理webhook時遇到了困難。我使用ultrahook,我真的開始活動,但是我得到一個:過濾器鏈在stripe_event gem開發中暫停
Processing by StripeEvent::WebhookController#event as XML
Parameters: {.... pending_webhooks"=>2, "request"=>"req_73S67hYD35c8K9", "api_version"=>"2015-09-08"}}
Filter chain halted as #<Proc:[email protected]/Users/mrl/.rvm/gems/[email protected]/app/controllers/stripe_event/webhook_controller.rb:3> rendered or redirected
Completed 401 Unauthorized in 7ms (ActiveRecord: 0.0ms)
3號線在stripe_event webhook_controller是:
before_filter do
我的條紋初始化如下:
Rails.configuration.stripe = {
publishable_key: ENV['STRIPE_PUBLISHABLE_KEY'],
secret_key: ENV['STRIPE_SECRET_KEY'],
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
StripeEvent.authentication_secret = ENV['STRIPE_WEBHOOK_SECRET']
StripeEvent.configure do |events|
events.all do |event|
puts "\n\n\nStripe Event please: #{event}\n\n\n"
end
end
該代碼適用於我們的分段服務器:
Processing by StripeEvent::WebhookController#event as XML
I, [2015-09-26T10:20:18.909875 #28955] INFO -- : Parameters: {..... "request"=>nil, "api_version"=>"2015-09-08"}}
I, [2015-09-26T10:20:19.395064 #28955] INFO -- :
Stripe Event please: {
"id": "...""
"created": 1443262813,
"livemode": false,
"type": "balance.available",
"data": {"object":{"pending":[{"amount":5460,"currency":"usd"}],"available":[{"amount":29707,"currency":"usd"}],"livemode":false,"object":"balance"}},
"object": "event",
"pending_webhooks": 1,
"request": null,
"api_version": "2015-09-08"
}
我一直在爲此奮鬥了幾天,而且我很難過。有沒有人有任何想法,我可以看看解決這個問題?