Esempio n. 1
0
        public static Options GetIyzicoOptions(IyzicoPaymentSettings iyzicoPaymentSettings)
        {
            var options = new Options
            {
                ApiKey    = iyzicoPaymentSettings.ApiKey,
                SecretKey = iyzicoPaymentSettings.SecretKey,
                BaseUrl   = iyzicoPaymentSettings.BaseUrl
            };

            return(options);
        }
 public IyzicoPaymentProcessor(ISettingService settingService, IPaymentIyzicoService iyzicoService, IyzicoPaymentSettings iyzicoPaymentSettings, IWebHelper webHelper, ILocalizationService localizationService, ICustomerService customerService, IShoppingCartService shoppingCartService, IPriceCalculationService priceCalculationService, IPaymentService paymentService, IHttpContextAccessor httpContextAccessor, IOrderTotalCalculationService orderTotalCalculationService, IWorkContext workContext, IShippingPluginManager shippingPluginManager, IStoreContext storeContext)
 {
     this._settingService               = settingService;
     this._iyzicoService                = iyzicoService;
     this._iyzicoPaymentSettings        = iyzicoPaymentSettings;
     this._webHelper                    = webHelper;
     this._localizationService          = localizationService;
     this._customerService              = customerService;
     this._shoppingCartService          = shoppingCartService;
     this._priceCalculationService      = priceCalculationService;
     this._paymentService               = paymentService;
     this._httpContextAccessor          = httpContextAccessor;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._workContext                  = workContext;
     this._shippingPluginManager        = shippingPluginManager;
     this._storeContext                 = storeContext;
 }
 public IyzicoPaymentProcessor(ISettingService settingService, IPaymentIyzicoService iyzicoService, IyzicoPaymentSettings iyzicoPaymentSettings, IWebHelper webHelper, ILocalizationService localizationService, ICustomerService customerService, IAddressService addressService, IProductService productService, ICategoryService categoryService, IShoppingCartService shoppingCartService, IPriceCalculationService priceCalculationService, IPaymentService paymentService, IHttpContextAccessor httpContextAccessor, IOrderTotalCalculationService orderTotalCalculationService, IWorkContext workContext, IShippingPluginManager shippingPluginManager, IStoreContext storeContext, IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor, ITaxService taxService, ICurrencyService currencyService)
 {
     this._settingService               = settingService;
     this._iyzicoService                = iyzicoService;
     this._iyzicoPaymentSettings        = iyzicoPaymentSettings;
     this._webHelper                    = webHelper;
     this._localizationService          = localizationService;
     this._customerService              = customerService;
     this._addressService               = addressService;
     this._productService               = productService;
     this._categoryService              = categoryService;
     this._shoppingCartService          = shoppingCartService;
     this._priceCalculationService      = priceCalculationService;
     this._paymentService               = paymentService;
     this._httpContextAccessor          = httpContextAccessor;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._workContext                  = workContext;
     this._shippingPluginManager        = shippingPluginManager;
     this._storeContext                 = storeContext;
     this._urlHelperFactory             = urlHelperFactory;
     this._actionContextAccessor        = actionContextAccessor;
     this._taxService                   = taxService;
     this._currencyService              = currencyService;
 }
        public override void Install()
        {
            //settings
            var settings = new IyzicoPaymentSettings
            {
                ApiKey    = "",
                SecretKey = "",
                BaseUrl   = "",
                PaymentMethodDescription = ""
            };

            _settingService.SaveSetting(settings);

            //locales
            #region locales
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.ApiKey", "Iyzico API Key");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.ApiKey.Hint", "Enter Iyzico API Key.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.ApiKey.Required", "API Key Is Required.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.SecretKey", "Iyzico Secret Key");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.SecretKey.Hint", "Enter Iyzico Secret Key.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.SecretKey.Required", "Secret Key Is Required.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.BaseUrl", "Iyzico Base URL");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.BaseUrl.Hint", "Enter Iyzico Base URL.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.BaseUrl.Required", "Base URL Is Required.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.Fields.PaymentMethodDescription", "Pay by credit / debit card using Iyzico payment service");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.CardHolderName", "Card Holder Name");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.CardNumber", "Card Number");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ExpirationDate", "Expiration Date");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.CardCode", "Card Code");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment", "Installment");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.EmptyInstalment", "Empty Instalment");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.IyzicoMessage.MessageCode", "Message Code");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.IyzicoMessage.Message", "Message");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Admin.IyzicoMessage.Deleted", "Deleted");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installments", "Installments", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.InstallmentRequired", "Installment Required", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.InstallmentCount", "Installment Count", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.MonthlyPayment", "Monthly Payment", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Total", "Total", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment1", "Single Payment", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment2", "2 Installments", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment3", "3 Installments", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment6", "6 Installments", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment9", "9 Installments", "en-US");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment12", "12 Installments", "en-US");
            #endregion

            //locales-on-turkish
            #region locales-on-turkish
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.CardHolderName", "Kart Sahibi", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.CardNumber", "Kart Numarası", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ExpirationDate", "Geçerlilik Tarihi", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.CardCode", "Güvenlik Kodu", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installments", "Taksit Seçenekleri", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.EmptyInstalment", "Taksit seçeneklerini görüntülemek için kart bilgilerinizi giriniz.", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.InstallmentRequired", "Taksit Gerekli", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.InstallmentNumber", "Taksit", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Price", "Taksit Tutarı", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.TotalPrice", "Toplam Tutar", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment1", "Tek Çekim", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment2", "2 Taksit", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment3", "3 Taksit", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment6", "6 Taksit", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment9", "9 Taksit", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment12", "12 Taksit", "tr-TR");
            #endregion

            //locales-error-messages-on-turkish
            #region locales-error-messages-on-turkish
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.8", "IdentityNumber gönderilmesi zorunludur!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.12", "Kart numarası geçersizdir!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.15", "Cvc geçersizdir!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.17", "ExpireYear ve expireMonth geçersizdir!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.5152", "Test kredi kartları ile ödeme yapılamaz!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10005", "İşlem onaylanmadı!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10012", "Geçersiz işlem!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10051", "Kart limiti yetersiz, yetersiz bakiye!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10054", "Son kullanma tarihi hatalı!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10057", "Kart sahibi bu işlemi yapamaz!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10093", "Kartınız internetten alışverişe kapalıdır. Açtırmak için ONAY yazıp kart son 6 haneyi 3340’a gönderebilirsiniz.", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10215", "Geçersiz kart numarası!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.ErrorMessage.10226", "İzin verilen PIN giriş sayısı aşılmış!", "tr-TR");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Iyzico.Installment.Wrong", "Geçersiz taksit!", "tr-TR");
            #endregion

            base.Install();
        }