This commit is contained in:
@@ -31,136 +31,117 @@ namespace Sockeye.Biz
|
||||
|
||||
//private static Dictionary<string, DateTime> _plugins;
|
||||
|
||||
//Generate a key message reply from a key selection object
|
||||
//CALLED BY LicenseController Generate route
|
||||
public static string GetKeyReply(dtoKeyOptions ko, LicenseTemplates t, rockfishContext ct)
|
||||
{
|
||||
// //Generate a key message reply from a key selection object
|
||||
// //CALLED BY LicenseController Generate route
|
||||
// public static string GetKeyReply(dtoKeyOptions ko, LicenseTemplates t, rockfishContext ct)
|
||||
// {
|
||||
|
||||
//case 3542
|
||||
ko.installByDate = System.DateTime.Now.AddYears(1);//changed from one month to one year
|
||||
string sKey = genKey(ko, ct);
|
||||
string sMsg = genMessage(sKey, ko, t);
|
||||
return sMsg;
|
||||
}
|
||||
// //case 3542
|
||||
// ko.installByDate = System.DateTime.Now.AddYears(1);//changed from one month to one year
|
||||
// string sKey = genKey(ko, ct);
|
||||
// string sMsg = genMessage(sKey, ko, t);
|
||||
// return sMsg;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
//called by trialkeyrequesthandler.GenerateFromRequest
|
||||
//get a trial key for named regTo
|
||||
public static string GetTrialKey(string regTo, bool lite, LicenseTemplates t, string authorizedUserKeyGeneratorStamp,
|
||||
string emailAddress, rockfishContext ct)//case 3233
|
||||
{
|
||||
DateTime dtoneMonth = System.DateTime.Now.AddMonths(1);
|
||||
long oneMonth = DateUtil.DateToEpoch(System.DateTime.Now.AddMonths(1));
|
||||
// //called by trialkeyrequesthandler.GenerateFromRequest
|
||||
// //get a trial key for named regTo
|
||||
// public static string GetTrialKey(string regTo, bool lite, LicenseTemplates t, string authorizedUserKeyGeneratorStamp,
|
||||
// string emailAddress, rockfishContext ct)//case 3233
|
||||
// {
|
||||
// DateTime dtoneMonth = System.DateTime.Now.AddMonths(1);
|
||||
// long oneMonth = DateUtil.DateToEpoch(System.DateTime.Now.AddMonths(1));
|
||||
|
||||
dtoKeyOptions ko = new dtoKeyOptions();
|
||||
// dtoKeyOptions ko = new dtoKeyOptions();
|
||||
|
||||
//case 3233
|
||||
ko.emailAddress = emailAddress;
|
||||
ko.customerId = 0; //not a customer so trial 0
|
||||
// //case 3233
|
||||
// ko.emailAddress = emailAddress;
|
||||
// ko.customerId = 0; //not a customer so trial 0
|
||||
|
||||
ko.registeredTo = regTo;
|
||||
ko.supportExpiresDate = oneMonth;
|
||||
ko.isLite = lite;
|
||||
ko.installByDate = dtoneMonth;
|
||||
ko.authorizedUserKeyGeneratorStamp = authorizedUserKeyGeneratorStamp;
|
||||
if (lite)
|
||||
{
|
||||
ko.users = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ko.users = 5;
|
||||
}
|
||||
// ko.registeredTo = regTo;
|
||||
// ko.supportExpiresDate = oneMonth;
|
||||
// ko.isLite = lite;
|
||||
// ko.installByDate = dtoneMonth;
|
||||
// ko.authorizedUserKeyGeneratorStamp = authorizedUserKeyGeneratorStamp;
|
||||
// if (lite)
|
||||
// {
|
||||
// ko.users = 1;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ko.users = 5;
|
||||
// }
|
||||
|
||||
ko.licenseType = "webRequestedTrial";
|
||||
// ko.licenseType = "webRequestedTrial";
|
||||
|
||||
ko.qbi = true;
|
||||
ko.qbiSupportExpiresDate = oneMonth;
|
||||
// ko.qbi = true;
|
||||
// ko.qbiSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.qboi = true;
|
||||
ko.qboiSupportExpiresDate = oneMonth;
|
||||
// ko.qboi = true;
|
||||
// ko.qboiSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.pti = true;
|
||||
ko.ptiSupportExpiresDate = oneMonth;
|
||||
// ko.pti = true;
|
||||
// ko.ptiSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.exportToXls = true;
|
||||
ko.exportToXlsSupportExpiresDate = oneMonth;
|
||||
// ko.exportToXls = true;
|
||||
// ko.exportToXlsSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.outlookSchedule = true;
|
||||
ko.outlookScheduleSupportExpiresDate = oneMonth;
|
||||
// ko.outlookSchedule = true;
|
||||
// ko.outlookScheduleSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.oli = true;
|
||||
ko.oliSupportExpiresDate = oneMonth;
|
||||
// ko.oli = true;
|
||||
// ko.oliSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.importExportCSVDuplicate = true;
|
||||
ko.importExportCSVDuplicateSupportExpiresDate = oneMonth;
|
||||
// ko.importExportCSVDuplicate = true;
|
||||
// ko.importExportCSVDuplicateSupportExpiresDate = oneMonth;
|
||||
|
||||
if (!lite)
|
||||
{
|
||||
ko.quickNotification = true;
|
||||
ko.quickNotificationSupportExpiresDate = oneMonth;
|
||||
// if (!lite)
|
||||
// {
|
||||
// ko.quickNotification = true;
|
||||
// ko.quickNotificationSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.mbi = true;
|
||||
ko.mbiSupportExpiresDate = oneMonth;
|
||||
// ko.mbi = true;
|
||||
// ko.mbiSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.wbi = true;
|
||||
ko.wbiSupportExpiresDate = oneMonth;
|
||||
// ko.wbi = true;
|
||||
// ko.wbiSupportExpiresDate = oneMonth;
|
||||
|
||||
ko.ri = true;
|
||||
ko.riSupportExpiresDate = oneMonth;
|
||||
}
|
||||
// ko.ri = true;
|
||||
// ko.riSupportExpiresDate = oneMonth;
|
||||
// }
|
||||
|
||||
string sKey = genKey(ko, ct);
|
||||
string sMsg = genMessage(sKey, ko, t);
|
||||
return sMsg;
|
||||
// string sKey = genKey(ko, ct);
|
||||
// string sMsg = genMessage(sKey, ko, t);
|
||||
// return sMsg;
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
//Take the key and the options and make a return message ready to send
|
||||
private static string genMessage(string sKey, dtoKeyOptions ko, LicenseTemplates template)
|
||||
private static string genMessage(License l, bool isFirstLicenseForCustomer)
|
||||
{
|
||||
string sMessage = "";
|
||||
|
||||
if (ko.licenseType == "new")
|
||||
if (l.TrialMode)
|
||||
{
|
||||
if (ko.isLite)
|
||||
{
|
||||
sMessage = template.LiteNew;
|
||||
}
|
||||
else
|
||||
{
|
||||
sMessage = template.FullNew;
|
||||
}
|
||||
sMessage = TemplateFullTrial;
|
||||
}
|
||||
else if (ko.licenseType == "addon")
|
||||
else
|
||||
{
|
||||
if (ko.isLite)
|
||||
{
|
||||
sMessage = template.LiteAddOn;
|
||||
}
|
||||
else
|
||||
{
|
||||
sMessage = template.FullAddOn;
|
||||
}
|
||||
}
|
||||
else//licensed trial
|
||||
{
|
||||
if (ko.isLite)
|
||||
{
|
||||
sMessage = template.LiteTrial;
|
||||
}
|
||||
else
|
||||
{
|
||||
sMessage = template.FullTrial;
|
||||
}
|
||||
if (isFirstLicenseForCustomer)
|
||||
sMessage = TemplateFullNew;
|
||||
else //add-on or renewal
|
||||
sMessage = TemplateFullAddOn;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//token substitutions
|
||||
sMessage = sMessage.Replace("[LicenseExpiryDate]", ko.installByDate.ToString("D"));//https://github.com/dotnet/coreclr/issues/2317
|
||||
sMessage = sMessage.Replace("[LicenseDescription]", LicenseInfo(ko));
|
||||
sMessage = sMessage.Replace("[LicenseKey]", sKey);
|
||||
sMessage = sMessage.Replace("[LicenseExpiryDate]", l.MaintenanceExpire.ToString("D"));//https://github.com/dotnet/coreclr/issues/2317
|
||||
sMessage = sMessage.Replace("[LicenseDescription]", LicenseInfo(l));
|
||||
sMessage = sMessage.Replace("[LicenseKey]", l.Key);
|
||||
|
||||
return sMessage;
|
||||
|
||||
@@ -239,7 +220,7 @@ namespace Sockeye.Biz
|
||||
}
|
||||
|
||||
sb.AppendLine($"Support and updates until: {l.MaintenanceExpire}\r\n");
|
||||
var Plugs=LicenseToPluginsArray(l);
|
||||
var Plugs = LicenseToPluginsArray(l);
|
||||
if (Plugs.Count > 0)
|
||||
{
|
||||
sb.Append("\r\n");
|
||||
@@ -530,6 +511,157 @@ oArP0E2Vbow3JMxq/oeXmHbrLMLQfYyXwFmciLFigOtkd45bfHdrbA==
|
||||
}
|
||||
|
||||
|
||||
#region Templates
|
||||
private static string TemplateFullNew
|
||||
{
|
||||
get
|
||||
{
|
||||
return @"Thank you for your purchase and welcome to the
|
||||
world-wide community of AyaNova users!
|
||||
|
||||
Below is your activation key instructions for entry into the latest trial version
|
||||
of AyaNova 7 that you previously downloaded from our website,
|
||||
installed and tested for suitability.
|
||||
|
||||
Be sure to review and implement the backup procedures for AyaNova
|
||||
as outlined in the AyaNova online Help document from http://www.ayanova.com/onlinehelp.htm
|
||||
|
||||
Reminder: no physical product will be shipped to you, this license key
|
||||
fulfills your order in full.
|
||||
|
||||
PURCHASING ADDITIONAL LICENSES
|
||||
When purchasing additional licenses in future be sure to use the same registration name
|
||||
and registered email address used when you purchased this key.
|
||||
|
||||
Additional AyaNova licenses can be purchased via the link at
|
||||
http://www.ayanova.com/purchase.htm
|
||||
|
||||
|
||||
HELP AND SUPPORT RESOURCES
|
||||
|
||||
ONLINE: , l.
|
||||
AyaNova web site:
|
||||
http://www.ayanova.com
|
||||
|
||||
Answers to frequently asked questions:
|
||||
http://www.ayanova.com/faqAnswers.htm
|
||||
|
||||
Technical support forum:
|
||||
http://forum.ayanova.com
|
||||
|
||||
Latest AyaNova version update information:
|
||||
Downloads and help documentation:
|
||||
http://www.ayanova.com/download.htm
|
||||
http://www.ayanova.com/onlinehelp.htm
|
||||
|
||||
PURCHASING ADDITIONAL LICENSES
|
||||
When purchasing additional license subscriptions in future do use the same registration name
|
||||
and registered email address used when you purchased your original licenses to ensure fastest processing.
|
||||
|
||||
[LicenseDescription]
|
||||
|
||||
HOW TO INSTALL YOUR LICENSE KEY
|
||||
|
||||
1. Ensure no other users are running AyaNova
|
||||
|
||||
2. Log in as the AyaNova Administrator
|
||||
(default login is manager with password letmein if not yet changed).
|
||||
|
||||
3. Select Help->License from the main menu to open the license key form.
|
||||
|
||||
4. Select the menu option Fetch license and in the form that opens, copy and paste (preferable) or enter manually your Fetch address and Fetch code exactly as it appears above in 'License Details' section of this message.
|
||||
(If you do not see the 'Fetch license' menu option you need to upgrade to the latest version of AyaNova first)
|
||||
|
||||
5.Click on the accept button, AyaNova will fetch the license key from our server and install it automatically";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static string TemplateFullAddOn
|
||||
{
|
||||
get
|
||||
{
|
||||
return @"Thank you for your continued support!
|
||||
|
||||
This license key when applied, replaces your previous key which is no longer required.
|
||||
|
||||
[LicenseDescription]
|
||||
|
||||
HOW TO INSTALL YOUR LICENSE KEY
|
||||
|
||||
1. Be sure you are running the latest version before proceeding:
|
||||
https://www.ayanova.com/changeloglatest.htm
|
||||
|
||||
2. Ensure no other users are running AyaNova
|
||||
|
||||
3. Log in as the AyaNova Administrator
|
||||
(default login is manager with password letmein if not yet changed).
|
||||
|
||||
4. Select Help->License from the main menu to open the license key form.
|
||||
|
||||
5. Select the menu option Fetch license and in the form that opens, copy and paste (preferable) or enter manually your Fetch address and Fetch code exactly as it appears above in 'License Details' section of this message.
|
||||
(If you do not see the 'Fetch license' menu option you need to upgrade to the latest version of AyaNova first)
|
||||
|
||||
6. Click on the accept button, AyaNova will fetch the license key from our server and install it automatically";
|
||||
}
|
||||
}
|
||||
|
||||
private static string TemplateFullTrial
|
||||
{
|
||||
get
|
||||
{
|
||||
return @"Thank you for evaluating AyaNova 7 and its optional add-ons.
|
||||
|
||||
Below are instructions for license entry into the
|
||||
latest trial version of AyaNova that you previously downloaded from our website.
|
||||
|
||||
You must apply this license before [LicenseExpiryDate].
|
||||
|
||||
|
||||
HELP AND SUPPORT RESOURCES
|
||||
|
||||
ONLINE:
|
||||
AyaNova web site:
|
||||
http://www.ayanova.com
|
||||
|
||||
Answers to frequently asked questions:
|
||||
http://www.ayanova.com/faqAnswers.htm
|
||||
|
||||
Technical support forum:
|
||||
http://forum.ayanova.com
|
||||
|
||||
Latest AyaNova version update information:
|
||||
Downloads and help documentation:
|
||||
http://www.ayanova.com/download.htm
|
||||
http://www.ayanova.com/onlinehelp.htm
|
||||
|
||||
|
||||
[LicenseDescription]
|
||||
|
||||
|
||||
HOW TO INSTALL YOUR LICENSE KEY
|
||||
|
||||
1. Ensure no other users are running AyaNova
|
||||
|
||||
2. Log in as the AyaNova Administrator
|
||||
(default login is manager with password letmein if not yet changed).
|
||||
|
||||
3. Select Help->License from the main menu to open the license key form.
|
||||
|
||||
4. Select the menu option Fetch license and in the form that opens, copy and paste (preferable) or enter manually your Fetch address and Fetch code exactly as it appears above in License Details section.
|
||||
(If you do not see the 'Fetch license' menu option you need to upgrade to the latest version of AyaNova first)
|
||||
|
||||
5. Click on the accept button, AyaNova will fetch the license key from our server and install it automatically";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion templates
|
||||
|
||||
|
||||
|
||||
|
||||
//eoc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user