File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -9,26 +9,29 @@ def initialize(event)
99
1010 def payment_succeeded
1111 return unless user . present?
12- InvoicesMailer . dispatch_invoice ( user . id )
12+ # Stripe sends receipts currently, so we don't need to.
13+ #InvoicesMailer.dispatch_invoice(user.id).deliver_now!
1314 end
1415
1516
1617 def payment_failed
1718 return unless user . present?
18- InvoicesMailer . problem_with_payment ( user . id )
19+ # todo style email
20+ #InvoicesMailer.problem_with_payment(user.id).deliver_now!
1921 if stripe_invoice . next_payment_attempt . blank?
2022 user . update ( selected_billing_plan_id : 1 )
21- InvoicesMailer . downgraded_to_starter ( user . id )
23+ # todo style email
24+ #InvoicesMailer.downgraded_to_starter(user.id).deliver_now!
2225 end
2326 end
2427
2528 private
2629
27- def stripe_customer
28- stripe_invoice . customer
29- end
30+ def stripe_customer
31+ stripe_invoice . customer
32+ end
3033
31- def stripe_invoice
32- event . data . object
33- end
34+ def stripe_invoice
35+ event . data . object
36+ end
3437end
You can’t perform that action at this time.
0 commit comments