public InfusionSoftClient(IInfusionSoftConfiguration configuration)
        {
            Configuration = configuration;

//            ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslpolicyerrors) => true;
//            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

            ApplicationName = configuration.ApplicationName;
            MethodListener  = new NullMethodListener();

            AffiliateService = new AffiliateServiceWrapper(configuration, this);
            ContactService   = new ContactServiceWrapper(configuration, this);
            DataService      = new CustomDataServiceWrapper(configuration, this);
            DiscountService  = new DiscountServiceWrapper(configuration, this);
            EmailService     = new EmailServiceWrapper(configuration, this);
            InvoiceService   = new InvoiceServiceWrapper(configuration, this);
            FileService      = new FileServiceWrapper(configuration, this);
            OrderService     = new OrderServiceWrapper(configuration, this);
            ProductService   = new ProductServiceWrapper(configuration, this);
            SearchService    = new SearchServiceWrapper(configuration, this);
            ShippingService  = new ShippingServiceWrapper(configuration, this);
            WebFormService   = new WebFormServiceWrapper(configuration, this);
            FunnelService    = new FunnelServiceWrapper(configuration, this);
        }
示例#2
0
        public InfusionSoftClient(IInfusionSoftConfiguration configuration)
        {
            Configuration = configuration;
            ServicePointManager.ServerCertificateValidationCallback +=
                (sender, certificate, chain, sslpolicyerrors) => true;

            //Workaround for infusionsoft change.
            //http://community.infusionsoft.com/showthread.php/15371-The-request-was-aborted-Could-not-create-SSL-TLS-secure-channel
            //Oct 16th, 2014 around 16:30 - Infusionsoft stopped allowing SSL3 connnetions
            //dropping back to (what used to be standard) TLS connections
            //ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

            ApplicationName = configuration.ApplicationName;
            MethodListener  = new NullMethodListener();

            AffiliateService = new AffiliateServiceWrapper(configuration, this);
            ContactService   = new ContactServiceWrapper(configuration, this);
            DataService      = new CustomDataServiceWrapper(configuration, this);
            DiscountService  = new DiscountServiceWrapper(configuration, this);
            EmailService     = new EmailServiceWrapper(configuration, this);
            InvoiceService   = new InvoiceServiceWrapper(configuration, this);
            FileService      = new FileServiceWrapper(configuration, this);
            OrderService     = new OrderServiceWrapper(configuration, this);
            ProductService   = new ProductServiceWrapper(configuration, this);
            SearchService    = new SearchServiceWrapper(configuration, this);
            ShippingService  = new ShippingServiceWrapper(configuration, this);
            WebFormService   = new WebFormServiceWrapper(configuration, this);
            FunnelService    = new FunnelServiceWrapper(configuration, this);
        }
        public InfusionSoftClient(IInfusionSoftConfiguration configuration)
        {
            Configuration   = configuration;
            ApplicationName = configuration.ApplicationName;
            MethodListener  = new NullMethodListener();

            AffiliateService = new AffiliateServiceWrapper(configuration, this);
            ContactService   = new ContactServiceWrapper(configuration, this);
            DataService      = new CustomDataServiceWrapper(configuration, this);
            DiscountService  = new DiscountServiceWrapper(configuration, this);
            EmailService     = new EmailServiceWrapper(configuration, this);
            InvoiceService   = new InvoiceServiceWrapper(configuration, this);
            FileService      = new FileServiceWrapper(configuration, this);
            OrderService     = new OrderServiceWrapper(configuration, this);
            ProductService   = new ProductServiceWrapper(configuration, this);
            SearchService    = new SearchServiceWrapper(configuration, this);
            ShippingService  = new ShippingServiceWrapper(configuration, this);
            WebFormService   = new WebFormServiceWrapper(configuration, this);
            FunnelService    = new FunnelServiceWrapper(configuration, this);
        }