public ActionResult AcceptAuth() { NameValueCollection parameters = System.Web.HttpContext.Current.Request.Params; IPizzaAuthResponse result = _banklinkApi.ParseIPizzaAuthResponse(parameters); TempData["blablabla"] = result; return(RedirectToAction("BankResponse")); }
public void ParseIPizzaAuthResponse_Verify_3012_Response_Parameters() { IPizzaAuthResponse authResponse = _banklinkApi.ParseIPizzaAuthResponse(new NameValueCollection { { "VK_SERVICE", "3012" }, { "VK_VERSION", "008" }, { "VK_DATETIME", "2015-04-05T08:30:31+0300" }, { "VK_SND_ID", "GENIPIZZA" }, { "VK_REC_ID", "uid100010" }, { "VK_USER_NAME", "Tõõger Leõpäöld" }, { "VK_USER_ID", "37602294565" }, { "VK_COUNTRY", "EE" }, { "VK_OTHER", "" }, { "VK_TOKEN", "5" }, { "VK_RID", "1428211826915" }, { "VK_MAC", "ERyUeE71UFwdEUqbKzOeByxDhHDFLPw5EDh7nXBHsMpA/JlRS/DBeviBXBYx7w72Zu7VYoc8yC4fgYJ935OJrAnBVnBwUIVg2hArrDE+/7piyon6ivZ9hNaSuWwgen1cyWZ8ObvtDcTnoRuBK/HEQjugjetzZO7Gdkdj/D/0fA+KQ8rZxojYQsXQ/HPbv9DVPNK9NPgG/Ir3UAdChkr5HYXREc4S+J0FQZafuJqJGvSDfOoe8Bc5uXl2VP12h30SCQeHuqLj//q19I1lXqIPHOxakjl00uJR8UBM41g/ZhH/2Lkbzm63KXhmavn862WoAEDpE4WaaHPpp07kIHyD+g==" }, { "VK_ENCODING", "utf-8" }, { "VK_LANG", "EST" }, }); Assert.That(authResponse.BankId, Is.EqualTo("GENIPIZZA")); Assert.That(authResponse.Country, Is.EqualTo("EE")); Assert.That(authResponse.IdCode, Is.EqualTo("37602294565")); Assert.That(authResponse.Language, Is.EqualTo("EST")); Assert.That(authResponse.Nonce, Is.Empty); Assert.That(authResponse.Other, Is.Empty); Assert.That(authResponse.RequestDateTime, Is.EqualTo(DateTime.ParseExact("2015-04-05T08:30:31+0300", "yyyy-MM-ddTHH:mm:sszz00", CultureInfo.InvariantCulture))); Assert.That(authResponse.RequestEncoding, Is.EqualTo("utf-8")); Assert.That(authResponse.RequestId, Is.EqualTo("1428211826915")); Assert.That(authResponse.Token, Is.EqualTo("5")); Assert.That(authResponse.UserName, Is.EqualTo("Tõõger Leõpäöld")); Assert.That(authResponse.User, Is.Empty); }