Ejemplo n.º 1
0
        private TmTokensModel GetNewCarpinoToken()
        {
            TmTokensModel    model            = new TmTokensModel();
            TaxiMeterService taxiMeterService = new TaxiMeterService();
            var ct = taxiMeterService.GetCarpinoToken();

            model.CarpinoToken        = ct.authToken;
            model.CarpinoRefreshToken = ct.refreshToken;
            return(model);
        }
Ejemplo n.º 2
0
 public string GetTap30Token(string code)
 {
     using (var dataModel = new MibarimEntities())
     {
         TaxiMeterService taxiMeterService = new TaxiMeterService();
         var token    = taxiMeterService.GetTap30Token(code);
         var newToken = new AppsToken();
         newToken.TokenApp        = (short)TokenApp.Tap30App;
         newToken.TokenCreateTime = DateTime.Now;
         newToken.TokenState      = (short)TokenStatus.Valid;
         newToken.Token           = token;
         dataModel.AppsTokens.Add(newToken);
         dataModel.SaveChanges();
         return(token);
     }
 }
Ejemplo n.º 3
0
 public string GetAlopeykToken(string code)
 {
     using (var dataModel = new MibarimEntities())
     {
         var aloPeykToken =
             dataModel.AppsTokens.OrderByDescending(x => x.TokenCreateTime)
             .FirstOrDefault(x => x.TokenApp == (short)TokenApp.AlopeykApp && x.TokenState == (short)TokenStatus.Invalid);
         //fasdf
         TaxiMeterService taxiMeterService = new TaxiMeterService();
         var token    = taxiMeterService.GetAloPeykToken(code, aloPeykToken.Token);
         var newToken = new AppsToken();
         newToken.TokenApp        = (short)TokenApp.AlopeykApp;
         newToken.TokenCreateTime = DateTime.Now;
         newToken.TokenState      = (short)TokenStatus.Valid;
         newToken.Token           = "Bearer " + token;
         dataModel.AppsTokens.Add(newToken);
         dataModel.SaveChanges();
         return(token);
     }
 }
Ejemplo n.º 4
0
        private string SendAloPeykSms()
        {
            TaxiMeterService taxiMeterService = new TaxiMeterService();

            return(taxiMeterService.SendAloPeykSms());
        }
Ejemplo n.º 5
0
        private string GetPriceFromTap30(SrcDstModel model, string tap30Token)
        {
            TaxiMeterService taxiMeterService = new TaxiMeterService();

            return(taxiMeterService.GetTap30Price(model.SrcLat, model.SrcLng, model.DstLat, model.DstLng, tap30Token));
        }
Ejemplo n.º 6
0
        private string GetNewTap30Token()
        {
            TaxiMeterService taxiMeterService = new TaxiMeterService();

            return(taxiMeterService.SendTap30TokenSms());
        }
Ejemplo n.º 7
0
        private string GetNewSnappToken()
        {
            TaxiMeterService taxiMeterService = new TaxiMeterService();

            return(taxiMeterService.GetSnapToken());
        }