Class: Pay::Webhooks::StripeController

Inherits:
ActionController::API
  • Object
show all
Defined in:
app/controllers/pay/webhooks/stripe_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
8
9
10
11
# File 'app/controllers/pay/webhooks/stripe_controller.rb', line 4

def create
  event = verified_event
  queue_event(event) if event.livemode || Pay::Stripe.webhook_receive_test_events
  head :ok
rescue ::Stripe::SignatureVerificationError => e
  log_error(e)
  head :bad_request
end