agile_pay_code.dart 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. class AgilePayCode {
  2. AgilePayCode._();
  3. static const int payCodeQqwalletNotSupport = 50000;
  4. static const int payCodeAlipaySuccess = 9000;
  5. static const int payCodeOtherError = 99999;
  6. static const int payCodeTokenError = 80000;
  7. static const int payCodeTokenFormatError = 80001;
  8. static const int payCodeWxEnvError = 80002;
  9. static const int payCodeWxNoResultError = 80003;
  10. static const int payCodeWxNoTokenError = 80004;
  11. static const int payCodeWxNoPayperidError = 80005;
  12. static const int payCodeParamsError = 80006;
  13. static const int payCodeSystemBusy = 4000;
  14. static const int payCodeOrderInfoError = 4001;
  15. static const int payCodeCancelError = 6001;
  16. static const int payCodeNetError = 6002;
  17. static const int payCodeShengKeyNotMatch = 70000;
  18. static const int payCodePayError = 70001;
  19. static const int payCodeSystemError = 70002;
  20. static const int payCodeNotSupport = 70003;
  21. static final Map<int, String> resultStatus = {
  22. payCodeSystemError: "系统异常",
  23. payCodeNotSupport: "不支持该支付类型",
  24. payCodeSystemBusy: "系统繁忙,请稍候再试",
  25. payCodeOrderInfoError: "订单参数错误",
  26. payCodeCancelError: "取消支付",
  27. payCodeNetError: "网络连接异常",
  28. payCodeTokenError: "Token获取失败",
  29. payCodeTokenFormatError: "Token格式错误",
  30. payCodeWxEnvError: "微信未安装或微信版本不支持",
  31. payCodeWxNoResultError: "微信支付无返回值",
  32. payCodeWxNoTokenError: "微信支付获取access_token错误",
  33. payCodeWxNoPayperidError: "微信支付获取payperid错误",
  34. payCodeParamsError: "参数错误",
  35. payCodePayError: "支付失败",
  36. payCodeShengKeyNotMatch: "证书不匹配",
  37. payCodeQqwalletNotSupport: "QQ未安装或QQ版本不支持",
  38. payCodeOtherError: "其他问题",
  39. };
  40. static String getMessageByCode(int code) {
  41. return resultStatus[code] ?? "Unknown code";
  42. }
  43. }