Files
hjha-server/NetWorkMessage/Message/MessageData/GameCenter/PayMessage.cs
xiaoou e9616125ce feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) +
game logic (GameFix/GameDAL/ServerData) +
network layer (NetWorkMessage) +
data layer (ObjectModel) +
utilities (MrWu/Core/Config/CloudAPI/dll) +
adapters (zyxAdapter/base)

.NET 8.0 C# solution, 16 projects, 958 source files
2026-07-07 12:02:15 +08:00

100 lines
2.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
using GameMessage.Const;
using MessagePack;
namespace GameMessage
{
[Message(MessageCode.PayPrepareRequest)]
[MessagePackObject]
public class PayPrepareRequest : MessageData
{
/// <summary>
/// 支付渠道
/// </summary>
[Key(0)]public PaymentChannel PaymentChannel;
/// <summary>
/// 订单渠道来源
/// </summary>
[Key(1)]public ChannelOriginType ChannelOriginType;
/// <summary>
/// 付款商品Id 对应 ProductionConfig
/// </summary>
[Key(2)]public int ProductId;
/// <summary>
/// 购买数量
/// </summary>
[Key(3)]public int Quantity;
/// <summary>
/// 购买的商品Id主要处理钻石不足情况下先充值钻石然后再获得该商品
/// </summary>
[Key(4)] public int BuyProductId;
/// <summary>
/// 充值对象角色类型
/// </summary>
[Key(5)]public OrderRoleType ReceiveOrderRoleType;
/// <summary>
/// 接受商品角色Id
/// </summary>
[Key(6)]public int ReceiveRoleId;
/// <summary>
/// 不同支付的透传参数 Json
/// </summary>
[Key(7)]public string Body;
#if GameClient
public static PayPrepareRequest Create()
{
return GameFramework.ReferencePool.Acquire<PayPrepareRequest>();
}
#endif
}
[Message(MessageCode.PayPrepareResponse)]
[MessagePackObject]
public class PayPrepareResponse : MessageData
{
[Key(0)]public int ErrorCode;
[Key(1)]public PaymentChannel PaymentChannel;
/// <summary>
/// 订单
/// </summary>
[Key(2)]public string TradeNo;
[Key(3)]public string Body;
[Key(4)]public string TotalAmount;
/// <summary>
/// 可以获得所有资产
/// </summary>
[Key(5)]public List<PlayerPropertyPack> PropertyPacks;
}
[Message(MessageCode.PayC2SNotifyRequest)]
[MessagePackObject]
public class PayC2SNotifyRequest : MessageData
{
[Key(0)]public PaymentChannel PaymentChannel;
[Key(1)]public string Body;
#if GameClient
public static PayC2SNotifyRequest Create()
{
return GameFramework.ReferencePool.Acquire<PayC2SNotifyRequest>();
}
#endif
}
[Message(MessageCode.PayC2SNotifyResponse)]
[MessagePackObject]
public class PayC2SNotifyResponse : MessageData
{
[Key(0)]public PaymentChannel PaymentChannel;
[Key(1)]public string Body;
[Key(2)]public bool IsSuccess;
}
}