2023-10-14 15:05:58 +00:00
|
|
|
|
using AscNet.Common.MsgPack;
|
2024-04-13 04:36:14 +00:00
|
|
|
|
using MessagePack;
|
2023-10-14 15:05:58 +00:00
|
|
|
|
|
|
|
|
|
namespace AscNet.GameServer.Handlers
|
|
|
|
|
{
|
2024-04-13 04:36:14 +00:00
|
|
|
|
#region MsgPackScheme
|
|
|
|
|
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
|
|
|
|
[MessagePackObject(true)]
|
|
|
|
|
public class PayInitiatedRequest
|
|
|
|
|
{
|
|
|
|
|
public string Key;
|
|
|
|
|
public string? TargetParam;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MessagePackObject(true)]
|
|
|
|
|
public class PayInitiatedResponse
|
|
|
|
|
{
|
|
|
|
|
public int Code;
|
|
|
|
|
}
|
|
|
|
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
|
|
|
|
#endregion
|
|
|
|
|
|
2023-10-14 15:05:58 +00:00
|
|
|
|
internal class PayModule
|
|
|
|
|
{
|
|
|
|
|
[RequestPacketHandler("GetPurchaseListRequest")]
|
|
|
|
|
public static void GetPurchaseListRequestHandler(Session session, Packet.Request packet)
|
|
|
|
|
{
|
2024-04-13 04:36:14 +00:00
|
|
|
|
session.SendResponse(new GetPurchaseListResponse(), packet.Id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[RequestPacketHandler("PayInitiatedRequest")]
|
2024-04-13 04:53:57 +00:00
|
|
|
|
public static void PayInitiatedRequestHandler(Session session, Packet.Request packet)
|
2024-04-13 04:36:14 +00:00
|
|
|
|
{
|
|
|
|
|
session.SendResponse(new PayInitiatedResponse() { Code = 1 }, packet.Id);
|
2023-10-14 15:05:58 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|