Exemple #1
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new PaySafePaymentSettings
            {
                UseSandbox   = true,
                TransactMode = TransactMode.AuthorizeAndCapture,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.TransactModeValues", "Transaction mode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.TransactModeValues.Hint", "Choose transaction mode.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.LocationId", "Location ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.LocationId.Hint", "Location ID found in your developer account project");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.DeveloperId", "Developer ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.DeveloperId.Hint", "Developer ID found in your developer account > project > project details");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.AdditionalFeePercentage", "Additional fee. Use percentage");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.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.PaySafe.Fields.UserId", "User ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.UserId.Hint", "User ID found in your developer account > project > API credentials");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.UserApiKey", "User API Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.Fields.UserApiKey.Hint", "User API Key found in your developer account > project > API credentials");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PaySafe.PaymentMethodDescription", "Pay by credit / debit card");

            base.Install();
        }
Exemple #2
0
 public PaysafePaymentProcessor(ISettingService settingService,
                                ICurrencyService currencyService,
                                ICustomerService customerService,
                                IWebHelper webHelper,
                                IOrderTotalCalculationService orderTotalCalculationService,
                                IOrderService orderService,
                                IOrderProcessingService orderProcessingService,
                                ILogger logger,
                                CurrencySettings currencySettings,
                                PaySafePaymentSettings paySafePaymentSettings,
                                ILocalizationService localizationService)
 {
     this._paySafePaymentSettings = paySafePaymentSettings;
     this._settingService         = settingService;
     this._currencyService        = currencyService;
     this._customerService        = customerService;
     this._currencySettings       = currencySettings;
     this._webHelper = webHelper;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._logger                 = logger;
     this._orderService           = orderService;
     this._orderProcessingService = orderProcessingService;
     this._localizationService    = localizationService;
 }