private static string SyncResultDescription(APPResult result) { switch (result) { case APPResult.Normal: { return("正常"); } case APPResult.NoNeedPay: { return("暂不需要缴费"); } case APPResult.RepeatPay: { return("重复缴费"); } case APPResult.NotFindIn: { return("该车辆找不到入场记录或车场网络延时"); } case APPResult.NotSupportedPay: { return("该车场不支持手机缴费"); } case APPResult.ProxyException: { return("车场网络不给力,暂停线上支付,请稍后再试"); } case APPResult.NoTempCard: { return("非临停卡,不能缴费"); } case APPResult.NotFindCard: { return("缴费异常【找不到卡片信息】"); } case APPResult.AmountIsNot: { return("计算停车费异常"); } case APPResult.OrderSX: { return("创建缴费信息异常"); } case APPResult.OtherException: { return("缴费异常【未知原因】"); } default: throw new MyException("缴费异常,请重试"); } }
/// <summary> /// 验证获取支付订单结果 /// </summary> /// <param name="result"></param> public static void CheckCalculatingTempCost(APPResult result, string otherErrorDesc = "") { if (result == APPResult.OtherException && !string.IsNullOrWhiteSpace(otherErrorDesc)) { throw new MyException(otherErrorDesc); } switch (result) { case APPResult.Normal: case APPResult.NoNeedPay: case APPResult.RepeatPay: { break; } case APPResult.NotFindIn: { throw new MyException("该车辆找不到入场记录,请稍后再试"); } case APPResult.NotSupportedPay: { throw new MyException("该车场不支持手机缴费"); } case APPResult.ProxyException: { throw new MyException("车场网络异常,暂不能缴费,请稍后再试!"); } case APPResult.NoTempCard: { throw new MyException("非临停卡,不能缴费"); } case APPResult.NotFindCard: { throw new MyException("缴费异常【找不到卡片信息】"); } case APPResult.AmountIsNot: { throw new MyException("计算停车费异常"); } case APPResult.OrderSX: { throw new MyException("订单已失效"); } case APPResult.OtherException: { throw new MyException("创建缴费信息异常!"); } case APPResult.NoBox: { throw new MyException("找不到岗亭信息"); } case APPResult.NoCarInBox: { throw new MyException("出口未识别到您的爱车"); //(联系电话0575-85679216) } case APPResult.ManualPay: { throw new MyException("请重新驶入"); // } case APPResult.NotIn: { throw new MyException("入口无无牌车"); } default: throw new MyException("缴费异常,请重试"); } }