-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from ucdavis/JCS/OrderEmailNotifications
WIP - Order Emails
- Loading branch information
Showing
12 changed files
with
251 additions
and
38 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Hippo.Email.Models | ||
{ | ||
public class OrderNotificationModel | ||
{ | ||
|
||
public string UcdLogoUrl { get; set; } = String.Empty; | ||
|
||
public string ButtonText { get; set; } = "View Order"; | ||
public string ButtonUrl { get; set; } = ""; | ||
|
||
public string Subject { get; set; } = ""; | ||
public string Header { get; set; } = ""; | ||
public List<string> Paragraphs { get; set; } = new(); | ||
|
||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
Hippo.Email/Views/Emails/OrderAdminPaymentFail_mjml.cshtml
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@using Hippo.Email.Models | ||
@model Hippo.Email.Models.OrderNotificationModel | ||
|
||
@{ | ||
ViewData["EmailTitle"] = "Order Notification"; | ||
Layout = "_EmailLayout_mjml"; | ||
} | ||
|
||
|
||
<mj-section border-top="4px solid #481268" border-left="1px solid #c7c8cc" border-right="1px solid #c7c8cc" | ||
background-color="#ffffff" padding-bottom="20px" padding-top="20px"> | ||
<mj-column width="100%" vertical-align="top"> | ||
<mj-text padding-top="0px" padding-bottom="0px" font-size="28px" color="#1F1F1F"> | ||
<p>@Model.Header</p> | ||
</mj-text> | ||
<mj-text padding-top="0px" padding-bottom="0px" font-size="24px" color="rgba(31,31,31,0.8)"> | ||
<p>There are one or more orders that have failing payments.</p> | ||
<p>The Sponsor has been notified, and until the billing is corrected the payment can't go through.</p> | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
|
||
|
||
<mj-section border-left="1px solid #c7c8cc" border-right="1px solid #c7c8cc" background-color="#ffffff" | ||
padding-bottom="0px" padding-top="20px"> | ||
<mj-column width="90%" vertical-align="top"> | ||
<mj-text padding-top="0px" padding-left="0px" padding-bottom="0px"> | ||
<h2>Orders With Failing Payments</h2> | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-section border-left="1px solid #c7c8cc" border-right="1px solid #c7c8cc" background-color="#ffffff" | ||
padding-bottom="0px" padding-top="10px"> | ||
<mj-column width="90%" vertical-align="top" border-left="4px solid #481268" padding-left="10px"> | ||
<mj-text line-height="1.5" padding-top="0px" padding-left="0px" padding-bottom="5px"> | ||
@foreach (var paragraph in @Model.Paragraphs) | ||
{ | ||
<p><a href="@paragraph">@paragraph</a></p> | ||
} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@using Hippo.Email.Models | ||
@model Hippo.Email.Models.OrderNotificationModel | ||
|
||
@{ | ||
ViewData["EmailTitle"] = "Order Notification"; | ||
Layout = "_EmailLayout_mjml"; | ||
} | ||
|
||
|
||
<mj-section border-top="4px solid #481268" border-left="1px solid #c7c8cc" border-right="1px solid #c7c8cc" | ||
background-color="#ffffff" padding-bottom="20px" padding-top="20px"> | ||
<mj-column width="100%" vertical-align="top"> | ||
<mj-text padding-top="0px" padding-bottom="0px" font-size="28px" color="#1F1F1F"> | ||
<p>@Model.Header</p> | ||
</mj-text> | ||
<mj-text padding-top="0px" padding-bottom="0px" font-size="24px" color="rgba(31,31,31,0.8)"> | ||
@foreach (var paragraph in @Model.Paragraphs) | ||
{ | ||
<p>@paragraph</p> | ||
} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
|
||
@await Html.PartialAsync("_EmailButton_mjml", new EmailButtonModel(@Model!.ButtonText, @Model!.ButtonUrl)) | ||
|
||
|
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 |
---|---|---|
|
@@ -30,6 +30,16 @@ | |
"ApiUrl": "https://sloth-api-test.azurewebsites.net/v2/", | ||
"HippoBaseUrl": "https://hippo-test.azurewebsites.net/" | ||
}, | ||
"Email": { | ||
"ApiKey": "[External]", | ||
"UserName": "[External]", | ||
"Password": "[External]", | ||
"Host": "[External]", | ||
"Port": 1, | ||
"FromEmail": "[email protected]", | ||
"FromName": "Hippo Notification", | ||
"BaseUrl": "https://localhost:44371" | ||
}, | ||
"ConnectionStrings": { | ||
"DefaultConnection": "[External]" | ||
} | ||
|
Oops, something went wrong.