Example #1
0
 public CanadaPostComputationMethod(IMeasureService measureService,
                                    IShippingService shippingService, ISettingService settingService,
                                    CanadaPostSettings canadaPostSettings, IWorkContext workContext)
 {
     this._measureService     = measureService;
     this._shippingService    = shippingService;
     this._settingService     = settingService;
     this._canadaPostSettings = canadaPostSettings;
     this._workContext        = workContext;
 }
 public CanadaPostComputationMethod(IMeasureService measureService,
     IShippingService shippingService, ISettingService settingService,
     CanadaPostSettings canadaPostSettings, IWorkContext workContext)
 {
     this._measureService = measureService;
     this._shippingService = shippingService;
     this._settingService = settingService;
     this._canadaPostSettings = canadaPostSettings;
     this._workContext = workContext;
 }
 public CanadaPostComputationMethod(CanadaPostSettings canadaPostSettings,
                                    ICurrencyService currencyService,
                                    ILogger logger,
                                    IMeasureService measureService,
                                    ISettingService settingService,
                                    IShippingService shippingService)
 {
     this._canadaPostSettings = canadaPostSettings;
     this._currencyService    = currencyService;
     this._logger             = logger;
     this._measureService     = measureService;
     this._settingService     = settingService;
     this._shippingService    = shippingService;
 }
 public CanadaPostComputationMethod(CanadaPostSettings canadaPostSettings,
     ICurrencyService currencyService,
     ILogger logger,
     IMeasureService measureService,
     ISettingService settingService,
     IShippingService shippingService)
 {
     this._canadaPostSettings = canadaPostSettings;
     this._currencyService = currencyService;
     this._logger = logger;
     this._measureService = measureService;
     this._settingService = settingService;
     this._shippingService = shippingService;
 }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            var settings = new CanadaPostSettings()
            {
                Url  = "sellonline.canadapost.ca",
                Port = 30000,
                //use "CPC_DEMO_XML" merchant ID for testing
                CustomerId = "CPC_DEMO_XML"
            };

            _settingService.SaveSetting(settings);

            base.Install();
        }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new CanadaPostSettings
            {
                UseSandbox = true
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Api", "API key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Api.Hint", "Specify Canada Post API key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerNumber", "Customer number");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerNumber.Hint", "Specify customer number.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");

            base.Install();
        }
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new CanadaPostSettings
            {
                UseSandbox = true
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Api", "API key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Api.Hint", "Specify Canada Post API key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.ContractId", "Contract ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.ContractId.Hint", "Specify contract identifier.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerNumber", "Customer number");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerNumber.Hint", "Specify customer number.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Instructions", "<p>To configure plugin follow one of these steps:<br />1. If you are a Canada Post commercial customer, fill Customer number, Contract ID and API key below.<br />2. If you are a Solutions for Small Business customer, specify your Customer number and API key below.<br />3. If you are a non-contracted customer or you want to use the regular price of shipping paid by customers, fill the API key field only.<br /><br /><em>Note: Canada Post gateway returns shipping price in the CAD currency, ensure that you have correctly configured exchange rate from PrimaryStoreCurrency to CAD.</em></p>");

            base.Install();
        }
Example #8
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new CanadaPostSettings()
            {
                Url  = "sellonline.canadapost.ca",
                Port = 30000,
                //use "CPC_DEMO_XML" merchant ID for testing
                CustomerId = "CPC_DEMO_XML"
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Url", "Canada Post URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Url.Hint", "Specify Canada Post URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Port", "Canada Post Port");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Port.Hint", "Specify Canada Post port.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerId", "Canada Post Customer ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerId.Hint", "Specify Canada Post customer identifier.");

            base.Install();
        }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new CanadaPostSettings
            {
                 UseSandbox = true
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Api", "API key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Api.Hint", "Specify Canada Post API key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerNumber", "Customer number");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerNumber.Hint", "Specify customer number.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");

            base.Install();
        }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new CanadaPostSettings
            {
                Url = "sellonline.canadapost.ca",
                Port = 30000,
                //use "CPC_DEMO_XML" merchant ID for testing
                CustomerId = "CPC_DEMO_XML"
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Url", "Canada Post URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Url.Hint", "Specify Canada Post URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Port", "Canada Post Port");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.Port.Hint", "Specify Canada Post port.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerId", "Canada Post Customer ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.CanadaPost.Fields.CustomerId.Hint", "Specify Canada Post customer identifier.");

            base.Install();
        }
 public CanadaPostShipmentTracker(CanadaPostSettings canadaPostSettings,
                                  ILogger logger)
 {
     this._canadaPostSettings = canadaPostSettings;
     this._logger             = logger;
 }
Example #12
0
 public CanadaPostShipmentTracker(CanadaPostSettings canadaPostSettings,
     ILogger logger)
 {
     this._canadaPostSettings = canadaPostSettings;
     this._logger = logger;
 }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            var settings = new CanadaPostSettings()
            {
                Url = "sellonline.canadapost.ca",
                Port = 30000,
                //use "CPC_DEMO_XML" merchant ID for testing
                CustomerId = "CPC_DEMO_XML"
            };
            _settingService.SaveSetting(settings);

            base.Install();
        }