Пример #1
0
        public void CreateIPizzaAuthRequest_Verify_4011_Request_Parameters()
        {
            BankRequest bankRequest = _banklinkApi.CreateIPizzaAuthRequest(new IPizzaAuthRequestParams
            {
                Language             = "EST",
                RequestStartDateTime = DateTime.ParseExact("2015-04-04T22:23:30+0300", "yyyy-MM-ddTHH:mm:sszz00", CultureInfo.InvariantCulture),
                RequestEncoding      = "utf-8",
                BankId             = "GENIPIZZA",
                ExpectedReturnCode = "3012",
                RequestId          = "1428175410690",
                ReturnUrl          = "http://localhost:8080/project/6rGPnXJ7cvstStKx?auth_action=success"
            });

            Assert.AreEqual("http://localhost:8080/banklink/ipizzaauth", bankRequest.RequestUrl);

            bankRequest.AssertFieldValueEqualTo("VK_SERVICE", "4011");
            bankRequest.AssertFieldValueEqualTo("VK_VERSION", "008");
            bankRequest.AssertFieldValueEqualTo("VK_SND_ID", "uid100010");
            bankRequest.AssertFieldValueEqualTo("VK_REPLY", "3012");
            bankRequest.AssertFieldValueEqualTo("VK_RETURN", "http://localhost:8080/project/6rGPnXJ7cvstStKx?auth_action=success");
            bankRequest.AssertFieldValueEqualTo("VK_DATETIME", "2015-04-04T22:23:30+0300");
            bankRequest.AssertFieldValueEqualTo("VK_RID", "1428175410690");
            bankRequest.AssertFieldValueEqualTo("VK_MAC", "SglHiOfR/FWRSnImNGBqmt139gmKxWeQQoSd3NoLJ5oSqSykT704oTZgZteJn8tDRSwhQEO5d7x1CX3wCn2Huzau6wZx/7k1nqH4s11TF9X6tw5DNHpgCId4li9RGH/v7j2cUBz5835ZZZ6gPNFZ6NCQdCeYD1Qr15Mq4wduotsAKznD/TWna5geQgfSbvPKrRT2yKCFdO+k9WujHD/OqqIQ5HNJy+q2k/8+5zb+stHr84FnoR/V2+prKhCM+yyJR3W85t7RiUQa+DgooZ2lITJj1SeNVxxilNcclkuwe7Jm/+CXrb2IEF1bXYkTO4W4dPDq4u7ofhJjXvc7c2EThQ==");
            bankRequest.AssertFieldValueEqualTo("VK_ENCODING", "utf-8");
            bankRequest.AssertFieldValueEqualTo("VK_LANG", "EST");
        }
Пример #2
0
        public void CreateEstcardPaymentRequest_Verify_Payment_Request_Parameters()
        {
            BankRequest bankRequest = _banklinkApi.CreateEstcardPaymentRequest(new EstcardPaymentRequestParams
            {
                AmountInCents       = 1336,
                ReturnUrl           = "http://localhost:8080/project/mJltvgDF1boyOPpL?payment_action=success",
                TransactionDateTime = DateTime.ParseExact("20140217154349", "yyyyMMddHHmmss", CultureInfo.InvariantCulture),
                Language            = "en",
                RequestEncoding     = "utf-8",
                TransactionNr       = 1392644629
            });

            Assert.AreEqual("http://localhost:8080/banklink/ec", bankRequest.RequestUrl);

            bankRequest.AssertFieldValueEqualTo("action", "gaf");
            bankRequest.AssertFieldValueEqualTo("ver", "004");
            bankRequest.AssertFieldValueEqualTo("id", "uid100049");
            bankRequest.AssertFieldValueEqualTo("ecuno", "1392644629");
            bankRequest.AssertFieldValueEqualTo("eamount", "1336");
            bankRequest.AssertFieldValueEqualTo("cur", "EUR");
            bankRequest.AssertFieldValueEqualTo("datetime", "20140217154349");
            bankRequest.AssertFieldValueEqualTo("feedBackUrl", "http://localhost:8080/project/mJltvgDF1boyOPpL?payment_action=success");
            bankRequest.AssertFieldValueEqualTo("delivery", "S");
            bankRequest.AssertFieldValueEqualTo("charEncoding", "utf-8");
            bankRequest.AssertFieldValueEqualTo("mac", "6E519E71A0403F1A528A4433D89CDEC413B8018A5471E98E0224AD9135C4AA9E3AF6C4635E06CD855E9CEAA7672FB14CA25E542DFEC83840C2D35D078CF7C02F55CEF1ED73F462DD404E141E38E3877ECA287E751469EBD1C20F4E35E77F4751F99688421A5E909D6CBD7208D4F1EAA8BC7F598ACFFAC11D8B7343B0FED592906E37D160AB4A5C3E263459D1FAFD849E242FC2BDF7F9450AA030D1DF1A1A836E64FBA3B2607C030DC4F4976249ED195D578A3DB16FB65D4C158F64A4215F4C150EA6B51DC32164DDE29B61D0FA0F711B731D11B3FB37AAF8D423D871C1122F0AAF11781F4CC078C39EEDE5DD56C14C4F651D7F347C3FF7405C5EAD074A4EB51A");
        }
Пример #3
0
        public void CreateIPizzaPaymentRequest_Verify_1012_Request_Parameters()
        {
            BankRequest bankRequest = _banklinkApi.CreateIPizzaPaymentRequest(new IPizzaPaymentRequestParams
            {
                ErrorReturnUrl         = "http://localhost:30535/Home/AcceptPayment",
                Amount                 = 10.15M,
                PaymentMessage         = "Shut up and take my $$$!",
                SuccessReturnUrl       = "http://localhost:30535/Home/AcceptPayment",
                Stamp                  = "74525",
                Currency               = "EUR",
                PaymentReferenceNumber = "",
                Language               = "EST",
                RequestStartDateTime   = DateTime.ParseExact("2015-04-04T23:17:34+0300", "yyyy-MM-ddTHH:mm:sszz00", CultureInfo.InvariantCulture),
                RequestEncoding        = "UTF-8",
                BankId                 = "GENIPIZZA"
            });

            Assert.That(bankRequest.RequestUrl, Is.EqualTo("http://localhost:8080/banklink/ipizzapayment"));

            bankRequest.AssertFieldValueEqualTo("VK_SERVICE", "1012");
            bankRequest.AssertFieldValueEqualTo("VK_VERSION", "008");
            bankRequest.AssertFieldValueEqualTo("VK_SND_ID", "uid100010");
            bankRequest.AssertFieldValueEqualTo("VK_STAMP", "74525");
            bankRequest.AssertFieldValueEqualTo("VK_AMOUNT", "10.15");
            bankRequest.AssertFieldValueEqualTo("VK_CURR", "EUR");
            bankRequest.AssertFieldValueEqualTo("VK_REF", "");
            bankRequest.AssertFieldValueEqualTo("VK_MSG", "Shut up and take my $$$!");
            bankRequest.AssertFieldValueEqualTo("VK_RETURN", "http://localhost:30535/Home/AcceptPayment");
            bankRequest.AssertFieldValueEqualTo("VK_CANCEL", "http://localhost:30535/Home/AcceptPayment");
            bankRequest.AssertFieldValueEqualTo("VK_DATETIME", "2015-04-04T23:17:34+0300");
            bankRequest.AssertFieldValueEqualTo("VK_MAC", "L1R5dsif+0Bba2NMZSN0f8uvyyLvtGd6JDIdOQ4/tK5bwLMHss5cZgFmKrUC8pXlmOtMYXrd+sh3WdqTo5W2K1N/Vwq6iPM14J56ZlJ24hM9iRS8KeCIiWkXgAnWpRtrXvvZWnLYkTdZrTiwZajml6hbkxiQY0UPSkQ/CNU3Re1mSjNW2ys0AJJ7RuoGmXbY5htubEcEiKsHFC76q1Ije+OrKlVJPCSLMbfAPe8Wc7LEP5OTowJ/O6MxocFE0A4U5ks5bSc3QO2XRZaIy6FkCIjZABhABICBmyuabfsWaHYAuuN7OjIvfYaTTryaAhY1gfWpLs1z5ForwOmGT5bG4A==");
            bankRequest.AssertFieldValueEqualTo("VK_ENCODING", "UTF-8");
            bankRequest.AssertFieldValueEqualTo("VK_LANG", "EST");
        }
Пример #4
0
        public void CreateIPizzaPaymentRequest_Verify_1011_Request_Parameters()
        {
            BankRequest bankRequest = _banklinkApi.CreateIPizzaPaymentRequest(new IPizzaPaymentRequestParams
            {
                ErrorReturnUrl         = "http://localhost:8080/project/6rGPnXJ7cvstStKx?payment_action=cancel",
                Amount                 = 150M,
                PaymentMessage         = "Torso Tiger",
                SuccessReturnUrl       = "http://localhost:8080/project/6rGPnXJ7cvstStKx?payment_action=success",
                RecipientAccountNumber = "EE871600161234567892",
                RecipientName          = "ÕIE MÄGER",
                Stamp    = "12345",
                Currency = "EUR",
                PaymentReferenceNumber = "1234561",
                Language             = "EST",
                RequestStartDateTime = DateTime.ParseExact("2015-04-04T22:58:16+0300", "yyyy-MM-ddTHH:mm:sszz00", CultureInfo.InvariantCulture),
                RequestEncoding      = "UTF-8",
                BankId = "GENIPIZZA"
            });

            Assert.That(bankRequest.RequestUrl, Is.EqualTo("http://localhost:8080/banklink/ipizzapayment"));

            bankRequest.AssertFieldValueEqualTo("VK_SERVICE", "1011");
            bankRequest.AssertFieldValueEqualTo("VK_VERSION", "008");
            bankRequest.AssertFieldValueEqualTo("VK_SND_ID", "uid100010");
            bankRequest.AssertFieldValueEqualTo("VK_STAMP", "12345");
            bankRequest.AssertFieldValueEqualTo("VK_AMOUNT", "150");
            bankRequest.AssertFieldValueEqualTo("VK_CURR", "EUR");
            bankRequest.AssertFieldValueEqualTo("VK_ACC", "EE871600161234567892");
            bankRequest.AssertFieldValueEqualTo("VK_NAME", "ÕIE MÄGER");
            bankRequest.AssertFieldValueEqualTo("VK_REF", "1234561");
            bankRequest.AssertFieldValueEqualTo("VK_MSG", "Torso Tiger");
            bankRequest.AssertFieldValueEqualTo("VK_RETURN", "http://localhost:8080/project/6rGPnXJ7cvstStKx?payment_action=success");
            bankRequest.AssertFieldValueEqualTo("VK_CANCEL", "http://localhost:8080/project/6rGPnXJ7cvstStKx?payment_action=cancel");
            bankRequest.AssertFieldValueEqualTo("VK_DATETIME", "2015-04-04T22:58:16+0300");
            bankRequest.AssertFieldValueEqualTo("VK_MAC", "N2aCtj20ynyMqirBV77bd/8JpG7yCH6G1W44yKFI7fHdnzgd0zUXZgkhNKOuZB+se0lmj5m+rzzvpkhuPjig3MI0gTE7SLcUAerck8QKr02dd+EQv14OKrw3wZSuuwPUZcH/PvySctKT3kOSO6FFI8ymdww7/CC1xdSAWAOes2wbv68Dtwhy4qQ1pc+jSqFNmNjwgK56BP1D2JBhikATUJxM4b0/GUA0utqkekekqrinElaQRQ8ddN8Jij7t+KPQme1w5xGU48DR4mI+A6nHKAVm+UinbEkRIuoc0sWba9vBvNBSdIAMYv1a3BVpg956Kx0uo1ZTc7veDDi7tFCb9w==");
            bankRequest.AssertFieldValueEqualTo("VK_ENCODING", "UTF-8");
            bankRequest.AssertFieldValueEqualTo("VK_LANG", "EST");
        }
Пример #5
0
        public void CreateIPizzaAuthRequest_Verify_4012_Request_Parameters()
        {
            BankRequest bankRequest = _banklinkApi.CreateIPizzaAuthRequest(new IPizzaAuthRequestParams
            {
                Language             = "EST",
                RequestStartDateTime = DateTime.ParseExact("2015-04-04T22:23:30+0300", "yyyy-MM-ddTHH:mm:sszz00", CultureInfo.InvariantCulture),
                RequestEncoding      = "utf-8",
                BankId    = "GENIPIZZA",
                RequestId = "1428175410690",
                ReturnUrl = "http://localhost:30535/Home/AcceptAuth",
                Nonce     = "9a3d6bd2-36d4-49b0-ae44-680c0281f39f"
            });

            Assert.That(bankRequest.RequestUrl, Is.EqualTo("http://localhost:8080/banklink/ipizzaauth"));

            bankRequest.AssertFieldValueEqualTo("VK_SERVICE", "4012");
            bankRequest.AssertFieldValueEqualTo("VK_VERSION", "008");
            bankRequest.AssertFieldValueEqualTo("VK_SND_ID", "uid100010");
            bankRequest.AssertFieldValueEqualTo("VK_REC_ID", "GENIPIZZA");
            bankRequest.AssertFieldValueEqualTo("VK_NONCE", "9a3d6bd2-36d4-49b0-ae44-680c0281f39f");
            bankRequest.AssertFieldValueEqualTo("VK_RETURN", "http://localhost:30535/Home/AcceptAuth");
            bankRequest.AssertFieldValueEqualTo("VK_DATETIME", "2015-04-04T22:23:30+0300");
            bankRequest.AssertFieldValueEqualTo("VK_RID", "1428175410690");
            bankRequest.AssertFieldValueEqualTo("VK_MAC", "H0r2Xoa0vzvylLxsWAphevA15rZpQ2buzzZlf/VFexaYKmXzZHWZnHCa7Pwf3VZ8ZoScFwVzlQAW5LJLlElPsliWaiovKZrVs4WCXTkP7Cd4jqRfDh4YwXCL+fISn/D9xTi/J3v17vKek7BbTVicRUGqf0ynh+DjgAVezaoPbfZ53ppaLESoqK3RF7O+HqphOxDwM8vO8g8+QiTs7dxJzru7SJlPCmLO1idc9TCoY+e80+fHCo2+zzz2cZu2iM48C6Ahk0tZ06Sw83f/UOhOxNJL6Ar0K9FgNCGBSN+NVQ0SPLg+0ubZ2DA16QAUjYdwYQSYhA+KF8B2ElN74eYvDw==");
            bankRequest.AssertFieldValueEqualTo("VK_ENCODING", "utf-8");
            bankRequest.AssertFieldValueEqualTo("VK_LANG", "EST");
        }