Class: Payola::Retriever
- Inherits:
-
Object
- Object
- Payola::Retriever
- Defined in:
- lib/payola.rb
Class Method Summary collapse
Class Method Details
.call(params) ⇒ Object
118 119 120 121 122 123 |
# File 'lib/payola.rb', line 118 def self.call(params) return nil if StripeWebhook.exists?(stripe_id: params[:id]) StripeWebhook.create!(stripe_id: params[:id]) event = Stripe::Event.retrieve(params[:id], { api_key: Payola.secret_key }) Payola.event_filter.call(event) end |