class Pay::Stripe::Webhooks::CheckoutSessionAsyncPaymentSucceeded

Public Instance Methods

call(event) click to toggle source
# File lib/pay/stripe/webhooks/checkout_session_async_payment_succeeded.rb, line 5
def call(event)
  # TODO: Also handle payment intents

  if event.data.object.subscription
    Pay::Stripe::Subscription.sync(event.data.object.subscription, stripe_account: event.try(:account))
  end
end