class AgilePayCode {
  AgilePayCode._();

  static const int payCodeQqwalletNotSupport = 50000;
  static const int payCodeAlipaySuccess = 9000;
  static const int payCodeOtherError = 99999;
  static const int payCodeTokenError = 80000;
  static const int payCodeTokenFormatError = 80001;
  static const int payCodeWxEnvError = 80002;
  static const int payCodeWxNoResultError = 80003;
  static const int payCodeWxNoTokenError = 80004;
  static const int payCodeWxNoPayperidError = 80005;
  static const int payCodeParamsError = 80006;
  static const int payCodeSystemBusy = 4000;
  static const int payCodeOrderInfoError = 4001;
  static const int payCodeCancelError = 6001;
  static const int payCodeNetError = 6002;
  static const int payCodeShengKeyNotMatch = 70000;
  static const int payCodePayError = 70001;
  static const int payCodeSystemError = 70002;
  static const int payCodeNotSupport = 70003;
  static const int payCodeNotConnectStore = 70004;
  static const int payCodeProductNotFindStore = 70005;
  static const int payCodeRequestSendError = 70006;

  static final Map<int, String> resultStatus = {
    payCodeSystemError: "系统异常",
    payCodeNotSupport: "不支持该支付类型",
    payCodeSystemBusy: "系统繁忙，请稍候再试",
    payCodeOrderInfoError: "订单参数错误",
    payCodeCancelError: "取消支付",
    payCodeNetError: "网络连接异常",
    payCodeTokenError: "Token获取失败",
    payCodeTokenFormatError: "Token格式错误",
    payCodeWxEnvError: "微信未安装或微信版本不支持",
    payCodeWxNoResultError: "微信支付无返回值",
    payCodeWxNoTokenError: "微信支付获取access_token错误",
    payCodeWxNoPayperidError: "微信支付获取payperid错误",
    payCodeParamsError: "参数错误",
    payCodePayError: "支付失败",
    payCodeShengKeyNotMatch: "证书不匹配",
    payCodeQqwalletNotSupport: "QQ未安装或QQ版本不支持",
    payCodeOtherError: "其他问题",
    payCodeNotConnectStore: "无法连接到商店",
    payCodeProductNotFindStore: "商品未找到",
    payCodeRequestSendError: "请求支付发送失败",
  };

  static String getMessageByCode(int code) {
    return resultStatus[code] ?? "Unknown code";
  }
}
