示例#1
0
        private CommManager()
        {
            ConfigManager configManager = new ConfigManager();

            _config = configManager.getConfig();

            //_config = new Dictionary<string, string>();
            //_config["url"] = Properties.Settings.Default.url;
            //_config["reportGroup"] = Properties.Settings.Default.reportGroup;
            //_config["username"] = Properties.Settings.Default.username;
            //_config["printxml"] = Properties.Settings.Default.printxml;
            //_config["timeout"] = Properties.Settings.Default.timeout;
            //_config["proxyHost"] = Properties.Settings.Default.proxyHost;
            //_config["merchantId"] = Properties.Settings.Default.merchantId;
            //_config["password"] = Properties.Settings.Default.password;
            //_config["proxyPort"] = Properties.Settings.Default.proxyPort;
            //_config["logFile"] = Properties.Settings.Default.logFile;
            //_config["neuterAccountNums"] = Properties.Settings.Default.neuterAccountNums;
            //_config["multiSite"] = Properties.Settings.Default.multiSite;
            //_config["printMultiSiteDebug"] = Properties.Settings.Default.printMultiSiteDebug;
            //_config["multiSiteUrl1"] = Properties.Settings.Default.multiSiteUrl1;
            //_config["multiSiteUrl2"] = Properties.Settings.Default.multiSiteUrl2;
            //_config["multiSiteErrorThreshold"] = Properties.Settings.Default.multiSiteErrorThreshold;
            //_config["maxHoursWithoutSwitch"] = Properties.Settings.Default.maxHoursWithoutSwitch;

            setupMultiSite();
        }
示例#2
0
        /**
         * Construct a Cnp online using the configuration specified in CnpSdkForNet.dll.config
         */
        public cnpRequest()
        {
            config = new Dictionary <string, string>();
            ConfigManager configManager = new ConfigManager();

            config = configManager.getConfig();
            // Retrieve all the settings.
            //config["url"] = Properties.Settings.Default.url;
            //config["reportGroup"] = Properties.Settings.Default.reportGroup;
            //config["username"] = Properties.Settings.Default.username;
            //config["printxml"] = Properties.Settings.Default.printxml;
            //config["timeout"] = Properties.Settings.Default.timeout;
            //config["proxyHost"] = Properties.Settings.Default.proxyHost;
            //config["merchantId"] = Properties.Settings.Default.merchantId;
            //config["password"] = Properties.Settings.Default.password;
            //config["proxyPort"] = Properties.Settings.Default.proxyPort;
            //config["sftpUrl"] =  Properties.Settings.Default.sftpUrl;
            //config["sftpUsername"] = Properties.Settings.Default.sftpUsername;
            //config["sftpPassword"] = Properties.Settings.Default.sftpPassword;
            //config["knownHostsFile"] = Properties.Settings.Default.knownHostsFile;
            //config["onlineBatchUrl"] = Properties.Settings.Default.onlineBatchUrl;
            //config["onlineBatchPort"] = Properties.Settings.Default.onlineBatchPort;
            //config["requestDirectory"] = Properties.Settings.Default.requestDirectory;
            //config["responseDirectory"] = Properties.Settings.Default.responseDirectory;
            //config["useEncryption"] = Properties.Settings.Default.useEncryption;
            //config["vantivPublicKeyId"] = Properties.Settings.Default.vantivPublicKeyId;
            //config["pgpPassphrase"] = Properties.Settings.Default.pgpPassphrase;

            initializeRequest();
        }
        /**
         * Construct a Cnp online using the configuration specified in CnpSdkForNet.dll.config
         */
        public CnpOnline()
        {
            ConfigManager configManager = new ConfigManager();

            _config = configManager.getConfig();

            //_config["url"] = Properties.Settings.Default.url;
            //_config["reportGroup"] = Properties.Settings.Default.reportGroup;
            //_config["username"] = Properties.Settings.Default.username;
            //_config["printxml"] = Properties.Settings.Default.printxml;
            //_config["timeout"] = Properties.Settings.Default.timeout;
            //_config["proxyHost"] = Properties.Settings.Default.proxyHost;
            //_config["merchantId"] = Properties.Settings.Default.merchantId;
            //_config["password"] = Properties.Settings.Default.password;
            //_config["proxyPort"] = Properties.Settings.Default.proxyPort;
            //_config["logFile"] = Properties.Settings.Default.logFile;
            //_config["neuterAccountNums"] = Properties.Settings.Default.neuterAccountNums;
            _communication = new Communications();
        }