mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
896918bc79
https://github.com/fleetdm/fleet/issues/9172 Changes: - Added `website/api/controllers/webhooks/recieve-stripe-subscription-events.js` a webhook for receiving Stripe events. - If the stripe event received is from a user's subscription automatically renewing, A new license key is generated, the subscription record is updated, and a renewal confirmation email is sent. - If the stripe event received is from a user's subscription's upcoming renewal, a renewal notification email is sent. - If any other event type is received from Stripe, the webhook returns a 200 response. - Added new email templates: - `email-subscription-renewal-confirmation` - `email-upcoming-subscription-renewal` - Updated `website/api/controllers/admin/view-email-template-preview.js` to have fake data for the added email templates. - Updated `website/api/controllers/customers/view-dashboard.js` to set two boolean variables: `subscriptionExpiresSoon` and `subscriptionHasBeenRecentlyRenewed` - Updated the customer dashboard to display notifications on the top of the page if a user's subscription will renew in the next 30 days, or if the user's subscription has been renewed in the past 30 days. - `website/views/layouts/layout-email.ejs` - Updated the font, padding, and text color to match wireframes.
19 lines
1.6 KiB
Plaintext
Vendored
19 lines
1.6 KiB
Plaintext
Vendored
<% /* Note: This is injected into `views/layouts/layout-email.ejs` */ %>
|
|
<h1 style="margin-bottom: 32px; font-weight: bold; font-size: 24px;">Your subscription will renew soon</h1>
|
|
<p style="margin-bottom: 32px;">Hello <%= firstName+' '+lastName %>,</p>
|
|
|
|
<p style="margin-bottom: 32px;">This is a reminder that your Fleet Premium subscription for <span style="font-weight: 700;">$<%= subscriptionPriceInWholeDollars %>/year</span> (<%= numberOfHosts %> devices @ $<%= subscriptionCostPerHost %>/device/month) will automatically renew <span style="font-weight: 700;"><%= moment(nextBillingAt).fromNow() %></span>.</p>
|
|
|
|
|
|
<p style="margin-bottom: 32px;">To avoid disruptions to you service, please log in to your <a style="color: #6A67FE;" href="<%= url.resolve(sails.config.custom.baseUrl,'/customers/dashboard')%>">customer dashboard</a> to check if your payment method/billing information is up to date.</p>
|
|
|
|
<div style="margin-bottom: 32px; text-align: left;">
|
|
<div style="background: #6A67FE; display: inline-block; color: white; text-decoration: none; border-radius: 4px; text-align: center; padding: 8px 16px 8px 16px" >
|
|
<a style="color: #EEE; text-decoration: none;" href="<%= url.resolve(sails.config.custom.baseUrl,'/customers/dashboard') %>">Go to your customer dashboard</a>
|
|
</div>
|
|
</div>
|
|
|
|
<p style="margin-bottom: 32px;">To change your number of devices, or to cancel your subscription, please reply to this email or <a style="color: #6A67FE;" href="<%= url.resolve(sails.config.custom.baseUrl,'/contact') %>">contact us</a>.</p>
|
|
|
|
<p style="margin-bottom: 32px;">Thank you again for using Fleet!</p>
|