Zbiór zmian 959

Pokaż
Ignoruj:
Data:
2009-12-22 08:54:00 (16 years ago)
Autor:
alina
Opis:

re #215 testy do funkcji pobierajacej hash z eCard

Lokalizacja:
trunk/eCard/eCardMVC
Pliki:
1 dodane
5 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/eCard/eCardMVC/Platnosci.Tests/Platnosci.Tests.csproj

    r954 r959  
    8484    <Compile Include="Properties\AssemblyInfo.cs" /> 
    8585    <Compile Include="TestRunner.cs" /> 
     86    <Compile Include="Web\eCardDataTests.cs" /> 
    8687    <Compile Include="Web\FunkcjePlatnosciTests.cs" /> 
    8788    <Compile Include="Web\MerchantControllerTests.cs" /> 
  • trunk/eCard/eCardMVC/Platnosci/App_GlobalResources/tlumaczenia.designer.cs

    r954 r959  
    161161         
    162162        /// <summary> 
    163         ///   Looks up a localized string similar to &apos;Invoice number&apos; is required.. 
     163        ///   Looks up a localized string similar to Invoice number is required.. 
    164164        /// </summary> 
    165165        internal static string err_faktura { 
  • trunk/eCard/eCardMVC/Platnosci/App_GlobalResources/tlumaczenia.resx

    r954 r959  
    216216  </data> 
    217217  <data name="err_faktura" xml:space="preserve"> 
    218     <value>'Invoice number' is required.</value> 
     218    <value>Invoice number is required.</value> 
    219219  </data> 
    220220  <data name="err_logowanie" xml:space="preserve"> 
  • trunk/eCard/eCardMVC/Platnosci/Controllers/MerchantController.cs

    r957 r959  
    5353                return View("Error1", _funkcjePlatnosci.InitErrorViewData(_translateManager.Translate("tlumaczenia", "error_hash"), payer.Id_faktury)); 
    5454             
    55             var adres = _eCardData.GetUrl(merchant); 
     55            var adres = _eCardData.GetUrl(merchant);  
    5656            Response.Redirect(adres);            
    5757            return new EmptyResult();           
  • trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs

    r957 r959  
    5252            merchant.Payment = newPayment; 
    5353            GetMerchantInfo(merchant); 
    54             SetHash(merchant); 
     54            merchant.Hash = SetHash(merchant); 
    5555 
    5656            //przeslanie w linku ordernumber potrzebnego do wyswietlenia potwierdzenia 
     
    8585            } 
    8686        } 
    87         private void SetHash(Merchant merchant) 
     87        public string SetHash(Merchant merchant) 
    8888        { 
     89            if (merchant == null) 
     90                throw new ArgumentNullException("parametr merchant is null in SetHash method"); 
     91 
    8992            var platnosc = _repPayment.Find(i => i.ORDERDESCRIPTION == merchant.Payment.ORDERDESCRIPTION && i.IDFaktury == merchant.Payment.IDFaktury && i.Data == merchant.Payment.Data).SingleOrDefault(); 
    9093 
    91             if (platnosc == null || merchant == null) 
    92             { 
     94            if (platnosc == null)             
    9395                merchant.Hash = HASH_ERROR_INFO; 
    94             } 
    9596            else 
    9697            { 
     
    117118                merchant.Hash = strResponse; 
    118119            } 
     120            return merchant.Hash; 
    119121        } 
    120122    }