subscription license code additions
This commit is contained in:
@@ -29,7 +29,7 @@ namespace rockfishCore.Controllers
|
|||||||
|
|
||||||
//### CUSTOMER ROUTE CALLED FROM RAVEN ####
|
//### CUSTOMER ROUTE CALLED FROM RAVEN ####
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IActionResult> PostLicenseFetchRequest([FromBody] dtoFetchRequest fetchRequest, [FromQuery] bool dtt)
|
public async Task<IActionResult> PostLicenseFetchRequest([FromBody] dtoFetchRequest fetchRequest, [FromQuery] bool dtt, [FromQuery] bool pp)
|
||||||
{
|
{
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
{
|
{
|
||||||
@@ -44,7 +44,7 @@ namespace rockfishCore.Controllers
|
|||||||
{
|
{
|
||||||
data = new
|
data = new
|
||||||
{
|
{
|
||||||
key = RavenKeyFactory.GetRavenTestKey(FetchRequestDbId)
|
key = RavenKeyFactory.GetRavenTestKey(FetchRequestDbId, pp)//pp means perpetual no pp means subcription
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ Plugins:
|
|||||||
// k.Id = $"00-{sId}";
|
// k.Id = $"00-{sId}";
|
||||||
k.RegisteredTo = CompanyName;
|
k.RegisteredTo = CompanyName;
|
||||||
k.DbId = dbid;
|
k.DbId = dbid;
|
||||||
k.Perpetual=Perpetual;
|
k.Perpetual = Perpetual;
|
||||||
|
|
||||||
//trial period time limit
|
//trial period time limit
|
||||||
k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddDays(TRIAL_PERIOD_DAYS);
|
k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddDays(TRIAL_PERIOD_DAYS);
|
||||||
@@ -341,6 +341,9 @@ Plugins:
|
|||||||
w.WritePropertyName("DBID");
|
w.WritePropertyName("DBID");
|
||||||
w.WriteValue(k.DbId);
|
w.WriteValue(k.DbId);
|
||||||
|
|
||||||
|
w.WritePropertyName("Perpetual");
|
||||||
|
w.WriteValue(k.Perpetual);
|
||||||
|
|
||||||
w.WritePropertyName("LicenseExpiration");
|
w.WritePropertyName("LicenseExpiration");
|
||||||
w.WriteValue(k.LicenseExpiration);
|
w.WriteValue(k.LicenseExpiration);
|
||||||
|
|
||||||
@@ -458,8 +461,9 @@ oArP0E2Vbow3JMxq/oeXmHbrLMLQfYyXwFmciLFigOtkd45bfHdrbA==
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//this is for development purposes only
|
||||||
public static string GetRavenTestKey(string dbid)
|
//No external usage
|
||||||
|
public static string GetRavenTestKey(string dbid, bool Perpetual)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Build a sample test key, sign it and return it
|
//Build a sample test key, sign it and return it
|
||||||
@@ -467,13 +471,10 @@ oArP0E2Vbow3JMxq/oeXmHbrLMLQfYyXwFmciLFigOtkd45bfHdrbA==
|
|||||||
k.LicenseFormat = "8";
|
k.LicenseFormat = "8";
|
||||||
k.RegisteredTo = "GZ TestCo Inc.";
|
k.RegisteredTo = "GZ TestCo Inc.";
|
||||||
k.DbId = dbid;
|
k.DbId = dbid;
|
||||||
// k.Features.Add(new LicenseFeature() { Feature = QBI_FEATURE_NAME, Count = 0 });
|
k.Perpetual = Perpetual;
|
||||||
// k.Features.Add(new LicenseFeature() { Feature = QBOI_FEATURE_NAME, Count = 0 });
|
|
||||||
// k.Features.Add(new LicenseFeature() { Feature = OLI_FEATURE_NAME, Count = 0 });
|
|
||||||
k.Features.Add(new LicenseFeature() { Feature = SERVICE_TECHS_FEATURE_NAME, Count = 100 });
|
k.Features.Add(new LicenseFeature() { Feature = SERVICE_TECHS_FEATURE_NAME, Count = 100 });
|
||||||
k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddMonths(1);
|
k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddDays(TRIAL_PERIOD_DAYS);
|
||||||
k.Features.Add(new LicenseFeature() { Feature = TRIAL_FEATURE_NAME, Count = 0 });
|
k.Features.Add(new LicenseFeature() { Feature = TRIAL_FEATURE_NAME, Count = 0 });
|
||||||
// k.Features.Add(new LicenseFeature() { Feature = SUBSCRIPTION_FEATURE_NAME, Count = 0 });
|
|
||||||
return GenerateRavenKey(k);
|
return GenerateRavenKey(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user