diff --git a/server/generator/SockBotProcessPurchasesIntoLicenses.cs b/server/generator/SockBotProcessPurchasesIntoLicenses.cs index cc969be..5ff6f3d 100644 --- a/server/generator/SockBotProcessPurchasesIntoLicenses.cs +++ b/server/generator/SockBotProcessPurchasesIntoLicenses.cs @@ -66,14 +66,19 @@ namespace Sockeye.Biz if (purchase.PGroup == ProductGroup.AyaNova7 && DateTime.UtcNow - purchase.PurchaseDate < PROCESS_V7_AGE) continue; } + + LEFT OFF HERE, the stuff below here is old stuff rom copied code so wipe adn repurpose as required + //was about to encode + + //if v7 license then lookup last license for same pgroup for same customer, if none then consider it a new license fresh + //if there is one and it's not entirely expired then duplicate and fixup from purchases in this group + + //IF raven license and have what is likely a recognizable dbid that ends in an = symbol then just make the new license and cancel the last one if that's necessary + + log.LogDebug($"Processing purchase id:{purchaseGroup[0].Id},purchasedate:{purchaseGroup.PurchaseDate}, custid:{purchaseGroup.CustomerId}"); - //if v7 product group the purchase must be more than 5 minutes old to account for mycommerce trickling in add-on bits to a v7 order - //(I went over old sales, mycommerce has at most 2 minutes variance in multiple item order on same day with the exception of unusual situations like where part - //of an order was on an invalid credit card or not updated in one case, another was a refund and purchase of alternate item etc) - //So in the normal course of things going to assume the best and check further down if something seems missing from last license - - + if (string.IsNullOrWhiteSpace(purchaseGroup.VendorData))