Sha256: 06b3e57695adf8a2be6da7097e1e5905ccf5a4877c2c5107f99fb50b475553fc
Contents?: true
Size: 728 Bytes
Versions: 44
Compression:
Stored size: 728 Bytes
Contents
# A subscription's first authorized transaction is created, or a successful transaction moves a subscription from the Past Due status to the Active status. Subscriptions with trial periods will not trigger this notification when they move from the trial period into the first billing cycle. module Pay module Braintree module Webhooks class SubscriptionWentActive def call(event) subscription = event.subscription return if subscription.nil? pay_subscription = Pay::Subscription.find_by_processor_and_id(:braintree, subscription.id) return unless pay_subscription.present? pay_subscription.update!(status: :active) end end end end end
Version data entries
44 entries across 44 versions & 1 rubygems