Пример #1
0
 public GestPayPaymentProcessor(GestPayPaymentSettings gestPayPaymentSettings,
                                IAddressService addressService,
                                ICustomerService customerService,
                                ICountryService countryService,
                                IGiftCardService giftCardService,
                                IHttpContextAccessor httpContextAccessor,
                                ILocalizationService localizationService,
                                IManufacturerService manufacturerService,
                                IOrderService orderService,
                                IPaymentService paymentService,
                                IProductService productService,
                                IScheduleTaskService scheduleTaskService,
                                ISettingService settingService,
                                IStateProvinceService stateProvinceService,
                                IStoreContext storeContext,
                                IWebHelper webHelper)
 {
     _gestPayPaymentSettings = gestPayPaymentSettings;
     _addressService         = addressService;
     _customerService        = customerService;
     _countryService         = countryService;
     _giftCardService        = giftCardService;
     _httpContextAccessor    = httpContextAccessor;
     _localizationService    = localizationService;
     _manufacturerService    = manufacturerService;
     _orderService           = orderService;
     _paymentService         = paymentService;
     _productService         = productService;
     _scheduleTaskService    = scheduleTaskService;
     _settingService         = settingService;
     _stateProvinceService   = stateProvinceService;
     _storeContext           = storeContext;
     _webHelper = webHelper;
 }
Пример #2
0
        /// <summary>
        /// Installazione Plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new GestPayPaymentSettings()
            {
                UseSandbox       = true,
                ShopOperatorCode = "9000001",
                LanguageCode     = 1,
                CurrencyUiCcode  = 242,
            };

            _settingService.SaveSetting(settings);

            //locales
            _localizationService.AddPluginLocaleResource(new Dictionary <string, string>
            {
                ["Plugins.Payments.GestPay.Fields.RedirectionTip"]  = "Sarai ridirezionato al circuito di pagamento di BancaSella per completare il pagamento dell'ordine.",
                ["Plugins.Payments.GestPay.Fields.UseSandbox"]      = "Usa Ambiente di test",
                ["Plugins.Payments.GestPay.Fields.UseSandbox.Hint"] = "Spunta se vuoi abilitare l'ambiente di test.",

                ["Plugins.Payments.GestPay.Fields.UseStarter"]      = "Usa GestPay Starter",
                ["Plugins.Payments.GestPay.Fields.UseStarter.Hint"] = "Spunta se vuoi indicare tipo account come Starter.",

                ["Plugins.Payments.GestPay.Fields.ShopOperatorCode"]             = "Codice esercente",
                ["Plugins.Payments.GestPay.Fields.ShopOperatorCode.Hint"]        = "Codice esercente di login. Es.: 0000001",
                ["Plugins.Payments.GestPay.Fields.AdditionalFee"]                = "Costo aggiuntivo",
                ["Plugins.Payments.GestPay.Fields.AdditionalFee.Hint"]           = "Inserisci il costo aggiuntivo che sarà accreditato al tuo cliente.",
                ["Plugins.Payments.GestPay.Fields.AdditionalFeePercentage"]      = "Costo aggiuntivo. Usa percentuale",
                ["Plugins.Payments.GestPay.Fields.AdditionalFeePercentage.Hint"] = "Determina se applicare un costo aggiuntivo in percentuale per l'importo totale dell'ordine. Se non selezionato, sarà applicato l'eventuale costo fisso.",
                ["Plugins.Payments.GestPay.Fields.CurrencyUICcode"]              = "Codice Valuta",
                ["Plugins.Payments.GestPay.Fields.CurrencyUICcode.Hint"]         = "Codice UIC che verrà passato al sistema di pagamento per determinare la valuta in cui è passato la somma da pagare.",
                ["Plugins.Payments.GestPay.Fields.LanguageCode"]      = "Codice Lingua",
                ["Plugins.Payments.GestPay.Fields.LanguageCode.Hint"] = "Codice che determina la lingua dell'interfaccia mostrata all'utente.",

                ["Plugins.Payments.GestPay.ErrorMessage.PageTitle"]     = "Attenzione!! si sono verificati degli errori.",
                ["Plugins.Payments.GestPay.ErrorMessage.PageMessage00"] = "Impossibile procedere con il pagamento.",
                ["Plugins.Payments.GestPay.ErrorMessage.PageMessage01"] = "La transazione ha avuto esito negativo.",
                ["Plugins.Payments.GestPay.ErrorMessage.TitleSummary"]  = "Riepilogo Problema:",

                ["Plugins.Payments.GestPay.Fields.ApiKey"]                       = "Api Key",
                ["Plugins.Payments.GestPay.Fields.ApiKey.Hint"]                  = "Enter Api Key",
                ["Plugins.Payments.GestPay.Fields.EnableGuaranteedPayment"]      = "Enable Guaranteed Payment",
                ["Plugins.Payments.GestPay.Fields.EnableGuaranteedPayment.Hint"] = "Only enable if Riskified API enable in your Gestpay account else contact gestpay support",
                ["Plugins.Payments.GestPay.PaymentMethodDescription"]            = "Verrai reindirizzato al sito GestPay per completare il pagamento",
            });

            base.Install();

            ScheduleTask task = new ScheduleTask();

            task.Enabled     = true;
            task.Name        = "Gestpay Verified Payment Check";
            task.Seconds     = 180;
            task.StopOnError = false;
            task.Type        = "Nop.Plugin.Payments.GestPay.Helper.RiskifiedStatusCheckScheduler, Nop.Plugin.Payments.GestPay";

            _scheduleTaskService.InsertTask(task);
        }