Beispiel #1
0
        public override void Install()
        {
            var settings = new WorldPayPaymentSettings()
            {
                UseSandbox       = true,
                InstanceId       = "",
                CreditCard       = "",
                CallbackPassword = "",
                CssName          = "",
                AdditionalFee    = 0,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.RedirectionTip", "You will be redirected to WorldPay site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.UseSandbox.Hint", "Use sandbox?");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.InstanceId", "Instance ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.InstanceId.Hint", "Enter instance ID.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.CreditCard", "Payment Method");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.CreditCard.Hint", "Enter payment method");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.CallbackPassword", "Callback password");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.CallbackPassword.Hint", "Enter callback password.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.CssName", "CSS");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.CssName.Hint", "Enter CSS.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WorldPay.AdditionalFee.Hint", "Enter additional fee to charge your customers.");

            base.Install();
        }
Beispiel #2
0
 public WorldPayPaymentProcessor(WorldPayPaymentSettings worldPayPaymentSettings,
                                 IStoreContext storeContext, ICurrencyService currencyService,
                                 CurrencySettings currencySettings,
                                 ISettingService settingService, IWebHelper webHelper, IWorkContext workContext)
 {
     this._worldPayPaymentSettings = worldPayPaymentSettings;
     this._storeContext            = storeContext;
     this._currencyService         = currencyService;
     this._currencySettings        = currencySettings;
     this._settingService          = settingService;
     this._webHelper   = webHelper;
     this._workContext = workContext;
 }