Implemented missing code for trial request to generate proper subscription / perpetual keys on request

This commit is contained in:
2022-08-22 20:35:43 +00:00
parent 2c509dcbe3
commit 5d8b0c1b6b
5 changed files with 90 additions and 56 deletions

View File

@@ -11,6 +11,8 @@ namespace AyaNova.Models
}
[Required]
public string DbId { get; set; }
[Required]
public bool Perpetual { get; set; }
[Required, EmailAddress]
public string Email { get; set; }
[Required]

View File

@@ -1,4 +1,4 @@
//#define DEVELOPMENT_TEST_ROCKFISH
#define DEVELOPMENT_TEST_ROCKFISH
using System;
using System.Text;
using System.Threading.Tasks;
@@ -486,6 +486,11 @@ namespace AyaNova.Core
{
trialRequest.DbId = ServerDbId;
#if (SUBSCRIPTION_BUILD)
trialRequest.Perpetual=false;
#else
trialRequest.Perpetual = true;
#endif
log.LogDebug($"Requesting trial license for DBID {LicenseDbId}");
string sUrl = $"{LICENSE_SERVER_URL_ROCKFISH}rvr";
try