/// <summary> /// Install plugin /// </summary> public override void Install() { //settings var settings = new FedexSettings { Url = "https://gatewaybeta.fedex.com:443/web-services/rate", DropoffType = DropoffType.BusinessServiceCenter, PackingPackageVolume = 5184 }; _settingService.SaveSetting(settings); //locales _localizationService.AddPluginLocaleResource(new Dictionary <string, string> { ["Plugins.Shipping.Fedex.Fields.Url"] = "URL", ["Plugins.Shipping.Fedex.Fields.Url.Hint"] = "Specify FedEx URL.", ["Plugins.Shipping.Fedex.Fields.Key"] = "Key", ["Plugins.Shipping.Fedex.Fields.Key.Hint"] = "Specify FedEx key.", ["Plugins.Shipping.Fedex.Fields.Password"] = "******", ["Plugins.Shipping.Fedex.Fields.Password.Hint"] = "Specify FedEx password.", ["Plugins.Shipping.Fedex.Fields.AccountNumber"] = "Account number", ["Plugins.Shipping.Fedex.Fields.AccountNumber.Hint"] = "Specify FedEx account number.", ["Plugins.Shipping.Fedex.Fields.MeterNumber"] = "Meter number", ["Plugins.Shipping.Fedex.Fields.MeterNumber.Hint"] = "Specify FedEx meter number.", ["Plugins.Shipping.Fedex.Fields.UseResidentialRates"] = "Use residential rates", ["Plugins.Shipping.Fedex.Fields.UseResidentialRates.Hint"] = "Check to use residential rates.", ["Plugins.Shipping.Fedex.Fields.ApplyDiscounts"] = "Use discounted rates", ["Plugins.Shipping.Fedex.Fields.ApplyDiscounts.Hint"] = "Check to use discounted rates (instead of list rates).", ["Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge"] = "Additional handling charge", ["Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge.Hint"] = "Enter additional handling fee to charge your customers.", ["Plugins.Shipping.Fedex.Fields.CarrierServices"] = "Carrier Services Offered", ["Plugins.Shipping.Fedex.Fields.CarrierServices.Hint"] = "Select the services you want to offer to customers.", ["Plugins.Shipping.Fedex.Fields.PassDimensions"] = "Pass dimensions", ["Plugins.Shipping.Fedex.Fields.PassDimensions.Hint"] = "Check if you want to pass package dimensions when requesting rates.", ["Plugins.Shipping.Fedex.Fields.PackingType"] = "Packing type", ["Plugins.Shipping.Fedex.Fields.PackingType.Hint"] = "Choose preferred packing type.", ["Plugins.Shipping.Fedex.Fields.PackingPackageVolume"] = "Package volume", ["Plugins.Shipping.Fedex.Fields.PackingPackageVolume.Hint"] = "Enter your package volume.", ["Plugins.Shipping.Fedex.Fields.DropoffType"] = "Dropoff Type", ["Plugins.Shipping.Fedex.Fields.DropoffType.Hint"] = "Choose preferred dropoff type.", ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.BusinessServiceCenter"] = "Business service center", ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.DropBox"] = "Drop box", ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.RegularPickup"] = "Regular pickup", ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.RequestCourier"] = "Request courier", ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.Station"] = "Station", ["Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByDimensions"] = "Pack by dimensions", ["Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByOneItemPerPackage"] = "Pack by one item per package", ["Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByVolume"] = "Pack by volume" }); base.Install(); }
public FedexComputationMethod(IMeasureService measureService, IShippingService shippingService, ISettingService settingService, FedexSettings fedexSettings, IOrderTotalCalculationService orderTotalCalculationService, ICurrencyService currencyService, CurrencySettings currencySettings) { this._measureService = measureService; this._shippingService = shippingService; this._settingService = settingService; this._fedexSettings = fedexSettings; this._orderTotalCalculationService = orderTotalCalculationService; this._currencyService = currencyService; this._currencySettings = currencySettings; }
/// <summary> /// Install plugin /// </summary> public override void Install() { //settings var settings = new FedexSettings() { Url = "https://gatewaybeta.fedex.com:443/web-services/rate", Street = "Sender Address Line 1", City = "Memphis", StateOrProvinceCode = "TN", PostalCode = "38115", CountryCode = "US" }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Url", "URL"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Url.Hint", "Specify FedEx URL."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Key", "Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Key.Hint", "Specify FedEx key."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Password", "Password"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Password.Hint", "Specify FedEx password."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AccountNumber", "Account number"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AccountNumber.Hint", "Specify FedEx account number."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.MeterNumber", "Meter number"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.MeterNumber.Hint", "Specify FedEx meter number."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.UseResidentialRates", "Use residential rates"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.UseResidentialRates.Hint", "Check to use residential rates."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.ApplyDiscounts", "Use discounted rates"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.ApplyDiscounts.Hint", "Check to use discounted rates (instead of list rates)."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge", "Additional handling charge"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge.Hint", "Enter additional handling fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CarrierServices", "Carrier Services Offered"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CarrierServices.Hint", "Select the services you want to offer to customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Street", "Shipping origin. Street"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Street.Hint", "Specify origin street."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.City", "Shipping origin. City"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.City.Hint", "Specify origin city."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.StateOrProvinceCode", "Shipping origin. State code (2 characters)"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.StateOrProvinceCode.Hint", "Specify origin state code (2 characters)."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PostalCode", "Shipping origin. Zip"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PostalCode.Hint", "Specify origin zip code."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CountryCode", "Shipping origin. Country code"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CountryCode.Hint", "Specify origin country code."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PassDimensions", "Pass dimensions"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PassDimensions.Hint", "Check if you want to pass package dimensions when requesting rates."); base.Install(); }
/// <summary> /// Install plugin /// </summary> public override void Install() { var settings = new FedexSettings() { Url = "https://gatewaybeta.fedex.com:443/web-services/rate", Street = "Sender Address Line 1", City = "Memphis", StateOrProvinceCode = "TN", PostalCode = "38115", CountryCode = "US" }; _settingService.SaveSetting(settings); base.Install(); }
/// <summary> /// Install plugin /// </summary> public override void Install() { //settings var settings = new FedexSettings() { Url = "https://gatewaybeta.fedex.com:443/web-services/rate", DropoffType = Nop.Plugin.Shipping.Fedex.DropoffType.BusinessServiceCenter, Street = "Sender Address Line 1", City = "Memphis", StateOrProvinceCode = "TN", PostalCode = "38115", CountryCode = "US", PackingPackageVolume = 5184 }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Url", "URL"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Url.Hint", "Specify FedEx URL."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Key", "Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Key.Hint", "Specify FedEx key."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Password", "Password"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Password.Hint", "Specify FedEx password."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AccountNumber", "Account number"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AccountNumber.Hint", "Specify FedEx account number."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.MeterNumber", "Meter number"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.MeterNumber.Hint", "Specify FedEx meter number."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.UseResidentialRates", "Use residential rates"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.UseResidentialRates.Hint", "Check to use residential rates."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.ApplyDiscounts", "Use discounted rates"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.ApplyDiscounts.Hint", "Check to use discounted rates (instead of list rates)."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge", "Additional handling charge"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge.Hint", "Enter additional handling fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CarrierServices", "Carrier Services Offered"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CarrierServices.Hint", "Select the services you want to offer to customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Street", "Shipping origin. Street"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Street.Hint", "Specify origin street."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.City", "Shipping origin. City"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.City.Hint", "Specify origin city."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.StateOrProvinceCode", "Shipping origin. State code (2 characters)"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.StateOrProvinceCode.Hint", "Specify origin state code (2 characters)."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PostalCode", "Shipping origin. Zip"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PostalCode.Hint", "Specify origin zip code."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CountryCode", "Shipping origin. Country code"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CountryCode.Hint", "Specify origin country code."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PassDimensions", "Pass dimensions"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PassDimensions.Hint", "Check if you want to pass package dimensions when requesting rates."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingType", "Packing type"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingType.Hint", "Choose preferred packing type."); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByDimensions", "Pack by dimensions"); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByOneItemPerPackage", "Pack by one item per package"); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByVolume", "Pack by volume"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingPackageVolume", "Package volume"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingPackageVolume.Hint", "Enter your package volume."); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.DropoffType", "Dropoff Type"); this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.DropoffType.Hint", "Choose preferred dropoff type."); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.DropoffType.BusinessServiceCenter", "Business service center"); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.DropoffType.DropBox", "Drop box"); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.DropoffType.RegularPickup", "Regular pickup"); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.DropoffType.RequestCourier", "Request courier"); this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Fedex.DropoffType.Station", "Station"); base.Install(); }
public FedexShipmentTracker(ILogger logger, FedexSettings fedexSettings) { this._logger = logger; this._fedexSettings = fedexSettings; }