Skip to content

Commit b0c2a72

Browse files
committed
add todos for sending stripe emails
1 parent 5dc4794 commit b0c2a72

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

app/services/stripe_invoice_events.rb

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff 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
3437
end

0 commit comments

Comments
 (0)