This commit is contained in:
2022-10-10 18:43:25 +00:00
parent 59318d73a5
commit 0290518a38
8 changed files with 73 additions and 77 deletions

View File

@@ -110,7 +110,7 @@ namespace rockfishCore.Controllers
newLicense.RegisteredTo = l.RegisteredTo;
newLicense.DbId = l.DbId;
newLicense.Perpetual=l.Perpetual;
newLicense.Perpetual = l.Perpetual;
if (l.LicenseExpires)
newLicense.LicenseExpiration = DateUtil.EpochToDate(l.LicenseExpirationDate);
else
@@ -144,16 +144,12 @@ namespace rockfishCore.Controllers
//If key is not revoked (don't warn them in that case) send notification to customer
if (l.RegisteredTo != RavenKeyFactory.REVOKED_TOKEN)
{
var body = $"Thank you for your purchase!\nYour AyaNova license key is ready to be installed.\nAyaNova will fetch it automatically within 24 hours or you can force it to fetch immediately from the License page in AyaNova now.\n---\n{newLicense}";
string licenseKeyType = "license";
if (!l.Perpetual)
licenseKeyType = "activation";
var body = $"Your AyaNova {licenseKeyType} key is ready to be installed.\nAyaNova will fetch it automatically within 24 hours or you can force it to fetch immediately from the License page in AyaNova now.\n---\n{newLicense}";
//send license email
#if (DEBUG)
RfMail.SendMessage("support@ayanova.com", "cardjohn@ayanova.com", "AyaNova license key", body, false);
#else
//throw new System.Exception("UNCOMMENT THIS FOR PRODUCTION");
RfMail.SendMessage("support@ayanova.com", Customer.AdminEmail, "AyaNova license key", body, false);
#endif
RfMail.SendMessage("support@ayanova.com", Customer.AdminEmail, $"AyaNova {licenseKeyType} key", body, false);
}
return Ok("ok");
}