Example #1
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new ExactorTaxSettings
            {
                MerchantId = string.Empty,
                UserId     = string.Empty
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.MerchantId", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.MerchantId.Hint", "Enter the Merchant ID that you received during registration at the website exactor.com.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.UserId", "User ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.UserId.Hint", "Enter your User ID from the website exactor.com.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.Country", "Country");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.Country.Hint", "Select country.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.Region", "State/Province");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.Region.Hint", "Select State/Province.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.City", "City");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.City.Hint", "Enter the city name.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.Address", "Address");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.Address.Hint", "Enter the address.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.Test", "Test tax calculation");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.ZipPostalCode", "Zip postal code");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.ZipPostalCode.Hint", "Enter the zip postal code.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Tax.Exactor.TestSuccess", "Test success! Tax: {0}");

            base.Install();
        }
Example #2
0
 public ExactorTaxProvider(ISettingService settingService,
                           ExactorTaxSettings exactorTaxSettings,
                           ICacheManager cacheManager,
                           ITaxCategoryService taxCategoryService)
 {
     this._settingService     = settingService;
     this._exactorTaxSettings = exactorTaxSettings;
     this._cacheManager       = cacheManager;
     this._taxCategoryService = taxCategoryService;
 }