Skip to content

Send donation receipt emails #659

@begedin

Description

@begedin

Problem

When the user successfully donates, they need to be sent a receipt. My guess is, this should happen when a charge succeeds, meaning they get a receipt every month.

Subtasks

  • add a “receipt” email to lib/code_corps/emails/receipt
  • replace config :code_corps, CodeCorps.Mailer, adapter: Bamboo.LocalAdapter with PostMark adapter - Add Postmark adapter for Bamboo emails #660
  • setup postmark account for production and maybe staging? (edited)
  • make postmark template
  • probably remove existing mailer test, replace with test for receipt
  • setup test env to use test adapter
  • make test work
  • dev env can still use local adapter, we need to see if it works with postmark (since postmark does templates), see if “sent_emails” endpoint works
  • either when handling invoice.payment_succeeded, or charge.succeeded, send the receipt email to the user who performed it. Should probably put that in the event handler itself, not the service which updates the database. Seems more fitting
  • Add test to check if that happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions