public override void Install() { var settings = new IyzicoPayPaymentSettings { ApiKey = "sandbox-VQM1Anw3zsWfx5g1YeypO9095gKQ83Ea", SecretKey = "sandbox-pUj1y0QNA4cmiDprNDEuXc3iHxaRFuYa", BaseUrl = "https://sandbox-api.iyzipay.com", Popup = false, AdditionalFee = 0, AdditionalFeePercentage = false, Installments = "0" }; _settingService.SaveSetting(settings); _localizationService.AddOrUpdatePluginLocaleResource("plugins.payments.iyzicopay.fields.apikey", "Api Key"); _localizationService.AddOrUpdatePluginLocaleResource("plugins.payments.iyzicopay.fields.apikey.hint", "İyzico'dan Aldığınız ApiKey Bilgisiniz Giriniz"); _localizationService.AddOrUpdatePluginLocaleResource("plugins.payments.iyzicopay.fields.baseurl", "Api Url"); _localizationService.AddOrUpdatePluginLocaleResource("plugins.payments.iyzicopay.fields.baseurl.Hint", "İyzico'dan aldığınız Bağlantı Bilgisi Girilecek Test Ortamı Urlsi Sandbox ile başlar Gerçek Ortamda Kullanılmaz"); _localizationService.AddOrUpdatePluginLocaleResource("plugins.payments.iyzicopay.fields.secretkey", "Güvenlik Anahtarı"); _localizationService.AddOrUpdatePluginLocaleResource("plugins.payments.iyzicopay.fields.secretkey.hint", "Güvenlik Anahtarı İyzico'dan Alınız"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IyzicoPay.Fields.Popup", "Popup"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IyzicoPay.Fields.Popup.hint", "İşaretlenirse Ödeme açılan pencereden yapılır."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IdentityNumber", "TC/Vergi No"); base.Install(); }
/// <summary> /// Gets the API context. /// </summary> /// <param name="iyzicoSettings">The iyzico settings.</param> /// <returns>Options.</returns> public static Options GetApiContext(IyzicoPayPaymentSettings iyzicoSettings) { var options = new Options { ApiKey = $"{iyzicoSettings.ApiKey.Trim().Replace(" ", string.Empty)}", SecretKey = $"{iyzicoSettings.SecretKey.Trim().Replace(" ", String.Empty)}", BaseUrl = $"{iyzicoSettings.BaseUrl.Trim().Replace(" ", String.Empty)}" }; return(options); }
public IyzicoPayPaymentProcessor(ILocalizationService localizationService, IOrderTotalCalculationService orderTotalCalculationService, ISettingService settingService, IWebHelper webHelper, IyzicoPayPaymentSettings iyzicoPayPaymentSettings, IStoreContext storeContext, ICustomerService customerService, IWorkContext workContext, TaxSettings taxSettings, ICurrencyService currencyService, ICategoryService categoryService, IHttpContextAccessor httpContextAccessor, IPaymentService paymentService, IGenericAttributeService genericAttributeService) { _localizationService = localizationService; _orderTotalCalculationService = orderTotalCalculationService; _settingService = settingService; _webHelper = webHelper; _iyzicoPayPaymentSettings = iyzicoPayPaymentSettings; _storeContext = storeContext; _customerService = customerService; _workContext = workContext; _taxSettings = taxSettings; _currencyService = currencyService; _categoryService = categoryService; _httpContextAccessor = httpContextAccessor; _paymentService = paymentService; _genericAttributeService = genericAttributeService; }