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; T = NullLocalizer.Instance; }
/// <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(); }