protected ClientAuthInfo GetStoreAuthorization()
        {
            var auth = new ClientAuthInfo
            {
                ClientNumber = _config.GetClientNumber(PaymentType.PAYMENTPLAN, _countryCode),
                Password     = _config.GetPassword(PaymentType.PAYMENTPLAN, _countryCode),
                Username     = _config.GetUsername(PaymentType.PAYMENTPLAN, _countryCode)
            };

            return(auth);
        }
Esempio n. 2
0
        private ClientAuthInfo GetStoreAuthorization()
        {
            PaymentType type = (_orderType == "Invoice" ? PaymentType.INVOICE : PaymentType.PAYMENTPLAN);
            var         auth = new ClientAuthInfo
            {
                ClientNumber = _config.GetClientNumber(type, _countryCode),
                Password     = _config.GetPassword(type, _countryCode),
                Username     = _config.GetUsername(type, _countryCode)
            };

            return(auth);
        }
Esempio n. 3
0
        public void TestGetDefaultConfigSe()
        {
            const CountryCode countrycode = CountryCode.SE;

            Assert.That(_defaultConf.GetUsername(PaymentType.INVOICE, countrycode), Is.EqualTo("sverigetest"));
            Assert.That(_defaultConf.GetPassword(PaymentType.INVOICE, countrycode), Is.EqualTo("sverigetest"));

            Assert.That(_defaultConf.GetUsername(PaymentType.INVOICE, countrycode),
                        Is.EqualTo(_defaultConf.GetUsername(PaymentType.PAYMENTPLAN, countrycode)));
            Assert.That(_defaultConf.GetPassword(PaymentType.INVOICE, countrycode),
                        Is.EqualTo(_defaultConf.GetPassword(PaymentType.PAYMENTPLAN, countrycode)));

            Assert.That(_defaultConf.GetClientNumber(PaymentType.INVOICE, countrycode), Is.EqualTo(79021));
            Assert.That(_defaultConf.GetClientNumber(PaymentType.PAYMENTPLAN, countrycode), Is.EqualTo(59999));

            Assert.That(_defaultConf.GetMerchantId(PaymentType.HOSTED, countrycode), Is.EqualTo("1130"));

            Assert.That(_defaultConf.GetSecretWord(PaymentType.HOSTED, countrycode),
                        Is.EqualTo("8a9cece566e808da63c6f07ff415ff9e127909d000d259aba24daa2fed6d9e3f8b0b62e8ad1fa91c7d7cd6fc3352deaae66cdb533123edf127ad7d1f4c77e7a3"));

            Assert.That(_defaultConf.GetEndPoint(PaymentType.HOSTED),
                        Is.EqualTo("https://webpaypaymentgatewaystage.svea.com/webpay/payment"));
            Assert.That(_defaultConf.GetEndPoint(PaymentType.INVOICE),
                        Is.EqualTo("https://webpaywsstage.svea.com/SveaWebPay.asmx?WSDL"));
        }