Esempio n. 1
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            var settings = new TwoCheckoutPaymentSettings()
            {
                UseSandbox    = false,
                AccountNumber = "",
                UseMd5Hashing = true,
                SecretWord    = "",
                AdditionalFee = 0,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.RedirectionTip", "You will be redirected to 2Checkout site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.AccountNumber", "Account number");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.AccountNumber.Hint", "Enter account number.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.UseMd5Hashing", "Use MD5 hashing");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.UseMd5Hashing.Hint", "The MD5 hash is provided to help you verify the authenticity of a sale. This is especially useful for vendors that sell downloadable products, or e - goods, as it can be used to verify whether sale actually came from 2Checkout and was a legitimate live sale.The secret word is set by yourself on the Site Managment page.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.SecretWord", "Secret Word");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.SecretWord.Hint", "Enter secret word.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.AdditionalFeePercentage", "Additional fee. Use percentage");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.2Checkout.PaymentMethodDescription", "You will be redirected to 2Checkout site to complete the order.");

            base.Install();
        }
Esempio n. 2
0
 public TwoCheckoutPaymentProcessor(ISettingService settingService,
                                    TwoCheckoutPaymentSettings twoCheckoutPaymentSettings,
                                    IOrderTotalCalculationService orderTotalCalculationService,
                                    ICurrencyService currencyService,
                                    CurrencySettings currencySettings)
 {
     this._settingService               = settingService;
     this._twoCheckoutPaymentSettings   = twoCheckoutPaymentSettings;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._currencyService              = currencyService;
     this._currencySettings             = currencySettings;
 }
 public TwoCheckoutPaymentProcessor(CurrencySettings currencySettings,
                                    ICurrencyService currencyService,
                                    IHttpContextAccessor httpContextAccessor,
                                    ILocalizationService localizationService,
                                    IPaymentService paymentService,
                                    ISettingService settingService,
                                    IWebHelper webHelper,
                                    TwoCheckoutPaymentSettings twoCheckoutPaymentSettings)
 {
     _currencySettings           = currencySettings;
     _currencyService            = currencyService;
     _httpContextAccessor        = httpContextAccessor;
     _localizationService        = localizationService;
     _paymentService             = paymentService;
     _settingService             = settingService;
     _webHelper                  = webHelper;
     _twoCheckoutPaymentSettings = twoCheckoutPaymentSettings;
 }