Pokaż
Ignoruj:
Data:
2009-11-03 16:06:42 (16 years ago)
Autor:
alina
Opis:

re #215

Pliki:
1 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/eCard/eCardMVC/Platnosci/Controllers/MerchantController.cs

    r868 r870  
    3232        private string merchantId; 
    3333        private readonly PlatnosciDataContext _context; 
    34         private readonly IRepositoryPE _rep; 
     34        private readonly IRepository<PlatnosciEcard> _rep; 
    3535        private FunkcjePlatnosci _func; 
    3636 
    3737        public MerchantController() 
    3838        {    
    39             _rep = new RepositoryPlatnosciEcard(); 
     39            _rep = new Repository<PlatnosciEcard>(new DataContext1()); 
    4040            _context = new PlatnosciDataContext(); 
    4141            _func = new FunkcjePlatnosci(); 
     
    4646 
    4747            int id1 = Convert.ToInt32(payer.Id_faktury); 
    48             vPlatnosciEcard platnosc = _context.FindInvoiceById(id1).SingleOrDefault(); 
     48            vPlatnosciEcard platnosc = _rep.FindInvoiceById(id1).SingleOrDefault(); 
    4949             
    5050            if (!_func.UserIdentity(platnosc, ControllerContext.HttpContext.User.Identity.Name)) 
     
    6464 
    6565            string hash = GetHash(newPayment, systemKs); 
     66            hash = hash.Replace("\n",""); 
     67            if (hash == BAD_HASH  || hash == "" ) return View("Error"); 
    6668 
    67             hash = hash.Replace("\n",""); 
    68             if (hash == BAD_HASH  || hash == "" ) 
    69             { 
    70                 return View("Error"); //nie mo¿na po³¹czyæ siê z serverem p³atnoœci. Proszê spróbowaæ jeszcze raz. 
    71             } 
    72             if (platnosc.SystemKsiegowyId == 1) 
    73                 merchantId = "170906000"; 
    74             else 
    75                 merchantId = "171485000"; 
     69            if (systemKs == "1") merchantId = "170906000"; 
     70                else merchantId = "171485000"; 
    7671 
    7772            string link = ConfigurationManager.AppSettings["StatusLink"];