-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stripe: Handle payment invoices and notify user (#3093)
* Stripe: Handle payment invoices and notify user * Update copy
- Loading branch information
Showing
8 changed files
with
186 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,3 +161,25 @@ export async function sendAdminDowngradeTooMuchDataEmail( | |
}; | ||
return sendEmail(email, message); | ||
} | ||
|
||
export async function sendAdminSubscriptionPaymentFailedEmail( | ||
email: string, | ||
customerPortailUrl: string | null | ||
): Promise<void> { | ||
const message = { | ||
from: { | ||
name: "Dust team", | ||
email: "[email protected]", | ||
}, | ||
subject: `[Dust] Your payment has failed`, | ||
html: `<p>Hello from Dust,</p> | ||
<p>Your payment has failed. Please visit ${customerPortailUrl} to edit your payment information.</p> | ||
<p> | ||
Please note: your workspace will be downgraded after 3 failed payment retries. This will trigger the removal of any feature attached to the paid plan you were on, and the permanent deletion of connections and the data associated with them. Any assistant that are linked to connections will also be removed. | ||
</p> | ||
<p>Please reply to this email if you have any questions.</p> | ||
<br /> | ||
<p>The Dust team</p>`, | ||
}; | ||
return sendEmail(email, message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters