Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(console): Emails for purchase and failed payments #2508

Merged
merged 6 commits into from
Jul 18, 2023

Conversation

poolsar42
Copy link
Collaborator

@poolsar42 poolsar42 commented Jul 15, 2023

Description

Sends emails for customers when there's an:

  • an issue with current payment option
  • purchase has been made with all info about the purchase

Related Issues

Testing

To test

  • successful payments: just buy entitlement in dev environment
  • failed payments:
    1. Hardcode email address in webhook.ts in invoice.payment_failed case in switch block.
    2. trigger this event with stripe CLI like stripe trigger invoice.payment_failed
      2a. It is also possible to trigger this event for specific customer as this: stripe trigger invoice.payment_succeeded --override payment_method:customer=cust_123 --override invoiceitem:customer=cust_123 --override invoice:customer=cust_123
      2b. Similarly it is possible to do stripe trigger invoice.payment_failed --override payment_method:customer=cust_123 --override invoiceitem:customer=cust_123 --override invoice:customer=cust_123

Explanation for this CLI commands.

Screenshot 2023-07-17 at 14 14 45 Screenshot 2023-07-17 at 14 15 04

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@poolsar42 poolsar42 marked this pull request as draft July 15, 2023 00:28
@poolsar42 poolsar42 self-assigned this Jul 15, 2023
@poolsar42 poolsar42 marked this pull request as ready for review July 17, 2023 18:16
@poolsar42 poolsar42 marked this pull request as draft July 17, 2023 20:14
@poolsar42 poolsar42 force-pushed the feat/2495-emails-purchase-and-failed-payments branch from 133d20a to 6f1afcb Compare July 17, 2023 22:42
@poolsar42 poolsar42 marked this pull request as ready for review July 17, 2023 22:44
apps/console/app/routes/__layout/billing/webhook.tsx Outdated Show resolved Hide resolved
apps/console/app/routes/__layout/billing/webhook.tsx Outdated Show resolved Hide resolved
platform/email/emailTemplate.ts Outdated Show resolved Hide resolved
betimshahini
betimshahini previously approved these changes Jul 18, 2023
@betimshahini betimshahini merged commit 3d22ebd into main Jul 18, 2023
@betimshahini betimshahini deleted the feat/2495-emails-purchase-and-failed-payments branch July 18, 2023 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(console): Emails for purchase and failed payments
2 participants