lib/pay/stripe.rb in pay-2.6.6 vs lib/pay/stripe.rb in pay-2.6.7
- old
+ new
@@ -9,10 +9,11 @@
autoload :ChargeRefunded, "pay/stripe/webhooks/charge_refunded"
autoload :ChargeSucceeded, "pay/stripe/webhooks/charge_succeeded"
autoload :CustomerDeleted, "pay/stripe/webhooks/customer_deleted"
autoload :CustomerUpdated, "pay/stripe/webhooks/customer_updated"
autoload :PaymentActionRequired, "pay/stripe/webhooks/payment_action_required"
+ autoload :PaymentIntentSucceeded, "pay/stripe/webhooks/payment_intent_succeeded"
autoload :PaymentMethodUpdated, "pay/stripe/webhooks/payment_method_updated"
autoload :SubscriptionCreated, "pay/stripe/webhooks/subscription_created"
autoload :SubscriptionDeleted, "pay/stripe/webhooks/subscription_deleted"
autoload :SubscriptionRenewing, "pay/stripe/webhooks/subscription_renewing"
autoload :SubscriptionUpdated, "pay/stripe/webhooks/subscription_updated"
@@ -47,9 +48,11 @@
# Listen to the charge event to make sure we get non-subscription
# purchases as well. Invoice is only for subscriptions and manual creation
# so it does not include individual charges.
events.subscribe "stripe.charge.succeeded", Pay::Stripe::Webhooks::ChargeSucceeded.new
events.subscribe "stripe.charge.refunded", Pay::Stripe::Webhooks::ChargeRefunded.new
+
+ events.subscribe "stripe.payment_intent.succeeded", Pay::Stripe::Webhooks::PaymentIntentSucceeded.new
# Warn user of upcoming charges for their subscription. This is handy for
# notifying annual users their subscription will renew shortly.
# This probably should be ignored for monthly subscriptions.
events.subscribe "stripe.invoice.upcoming", Pay::Stripe::Webhooks::SubscriptionRenewing.new