public ZarinPalPaymentProcessor(ILocalizationService localizationService,
                                 IOrderTotalCalculationService orderTotalCalculationService,
                                 ISettingService settingService,
                                 ZarinPalPaymentSettings zarinPalPaymentSettings,
                                 ILogger logger,
                                 IOrderService orderService)
 {
     this._localizationService          = localizationService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._settingService          = settingService;
     this._zarinPalPaymentSettings = zarinPalPaymentSettings;
     this._logger     = logger;
     _orderRepository = EngineContext.Current.Resolve <IRepository <Order> >();
 }
Exemplo n.º 2
0
        public override void Install()
        {
            //settings
            var settings = new ZarinPalPaymentSettings()
            {
                MerchantCode = "",
                Description  = "",
                UseSsl       = false,
                CurrencyId   = 0
            };

            //localization
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.EMail", "پست الکترونیکی");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.Description", "توضیحات");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.MerchantCode", "مرچنت کد");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.Phonenumber", "شماره همراه");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.Currency", "واحد پول");

            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Success", "تراکنش با موافقیت انجام شد");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Failed", "تراکنش با موافقیت انجام نشد");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Authority", "شناسه پرداخت");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.PaymentMethodDescription", "درگاه پرداخت زرین پال");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.RedirectionTip", "به درگاه زرین پال هدایت میشوید");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.UseSsl", "از Ssl استفاده می کنید؟");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.EMail.IsWrong", "لطفا، پست الکترونیکی را درست وارد کنید");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.Fields.Phonenumber.TypeIsNotValid", "لطفا، شماره همراه را به درستی وارد کنید");
            this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService,
                                                 "Plugins.Payments.ZarinPal.PleaseSelect", "لطفا، انتخاب کنید");

            _settingService.SaveSetting(settings);

            base.Install();
        }