using System.Collections.Generic;

namespace GameMessage
{
    public static partial class MessageErrCode
    {
        private static Dictionary<int, string> _payErrorMsg = new Dictionary<int, string>()
        {
            { PayErrorAmount, "支付金额错误" },
            { PayIsPaying, "订单支付中" },
            { PayErrorReceiveRole, "充值对象不存在" },
            { PayErrorPayRole, "付款对象不存在" },
            { PayErrorRpc, "调用支付失败" },
            { PayErrorOrderNotExist, "订单不存在" },
            { PayErrorConfigNotExist, "商品不存在" },
        };

        public static string GetPayErrorMsg(int code)
        {
            return _payErrorMsg.TryGetValue(code, out string msg) ? msg : "";
        }
    }
}