mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 15:39:01 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace RadicadeServer.RecNet.Store
|
||||
{
|
||||
public class CampusCard
|
||||
{
|
||||
public CampusCardSubscription? subscription { get; set; }
|
||||
public long? platformAccountSubscribedPlayerId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RadicadeServer.RecNet.Store;
|
||||
using RadicadeServer.Extensions;
|
||||
|
||||
namespace RadicadeServer.API.CampusCard.V1
|
||||
{
|
||||
[Route("api/CampusCard/v1")]
|
||||
[Route("econ/api/CampusCard/v1")]
|
||||
public class CampusCardAPI : Controller
|
||||
{
|
||||
[HttpPost("UpdateAndGetSubscription")]
|
||||
public ActionResult<RecNet.Store.CampusCard> GetSubscription()
|
||||
{
|
||||
var playerId = User?.GetUserId() ?? 0;
|
||||
var now = DateTime.UtcNow;
|
||||
return Ok(new RecNet.Store.CampusCard
|
||||
{
|
||||
subscription = new CampusCardSubscription
|
||||
{
|
||||
subscriptionId = 1,
|
||||
recNetPlayerId = playerId,
|
||||
platformType = null,
|
||||
platformId = "",
|
||||
platformPurchaseId = "",
|
||||
level = RecNet.Enums.Store.SKU.CampusCardLevel.Gold,
|
||||
period = RecNet.Enums.Store.SKU.CampusCardPeriod.Year,
|
||||
expirationDate = now.AddYears(1),
|
||||
isAutoRenewing = true,
|
||||
createdAt = now,
|
||||
modifiedAt = now
|
||||
},
|
||||
platformAccountSubscribedPlayerId = null
|
||||
});
|
||||
}
|
||||
|
||||
[HttpGet("SignUpBonus")]
|
||||
public IActionResult SignUpBonus() => Ok(new
|
||||
{
|
||||
RRPlusSignUpBonusId = 3,
|
||||
MinFreeItemsPrice = 0,
|
||||
MaxFreeItemsPrice = 10000
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using RadicadeServer.RecNet.Enums.Players;
|
||||
using RadicadeServer.RecNet.Enums.Store.SKU;
|
||||
|
||||
namespace RadicadeServer.RecNet.Store
|
||||
{
|
||||
public class CampusCardSubscription
|
||||
{
|
||||
public long subscriptionId { get; set; }
|
||||
public long recNetPlayerId { get; set; }
|
||||
public Platforms? platformType { get; set; }
|
||||
public string platformId { get; set; } = null!;
|
||||
public string platformPurchaseId { get; set; } = null!;
|
||||
public CampusCardLevel level { get; set; }
|
||||
public CampusCardPeriod period { get; set; }
|
||||
public DateTime expirationDate { get; set; }
|
||||
public bool isAutoRenewing { get; set; }
|
||||
public DateTime createdAt { get; set; }
|
||||
public DateTime modifiedAt { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace RadicadeServer.Commerce;
|
||||
|
||||
[Route("commerce")]
|
||||
public class CommercePlaceholderAPI : Controller
|
||||
{
|
||||
[HttpGet("purchase/v1/hasspentmoney")]
|
||||
public bool HasSpentMoney()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[HttpGet("api/catalog/v1/all")]
|
||||
public object GetCatalogAll()
|
||||
{
|
||||
return Array.Empty<object>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[HttpPost("purchase/v1/cleanuppending")]
|
||||
public object CleanupPendingTransactions()
|
||||
{
|
||||
return new { };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user