public SendSpendManualPaymentProcessor(ILocalizationService localizationService, IOrderTotalCalculationService orderTotalCalculationService, ISettingService settingService, ICurrencyService currencyService, ICustomerService customerService, IPaymentService paymentService, SendSpendManualPaymentSettings manualPaymentSettings, CurrencySettings currencySettings, IWebHelper webHelper, IWorkContext workContext, ITaxService taxService ) { this._localizationService = localizationService; this._orderTotalCalculationService = orderTotalCalculationService; this._settingService = settingService; this._currencyService = currencyService; this._customerService = customerService; this._paymentService = paymentService; this._webHelper = webHelper; this._manualPaymentSettings = manualPaymentSettings; this._currencySettings = currencySettings; this._workContext = workContext; this._taxService = taxService; }
/// <summary> /// Install the plugin /// </summary> public override void Install() { //settings var settings = new SendSpendManualPaymentSettings { MerchantOrderAlive = 5, MerchantBaseUrl = _webHelper.GetStoreLocation(), NotifyUrl = _webHelper.GetStoreLocation() + "PaymentSendSpendManual/IPNHandler/?order={0}&status={1}", AppId = "2ee452f4-2ce8-483e-bd67-8d999cd5b33e" }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.AppUrl", "Base App Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.MerchantAppId", "Merchant App Id"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.MerchantName", "Merchant Name"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.MerchantUniqueId", "Merchant UniqueId"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.MerchantBaseUrl", "Merchant Base Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.NotifyUrl", "Notify Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.ContinueUrl", "Continue Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.MerchantOrderAlive", "Order alive"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.MerchantUniqueId.Hint", "Merchant wallet Id provided by SendSpend."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Fields.MerchantOrderAlive.Hint", "Time to expire pending order; if user did not complete the transaction on time."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Country", "Please select your country:"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.PhoneNumber", "Enter your registered phone number:"); //this.AddOrUpdatePluginLocaleResource("plugins.payments.sendspendmanual.paymentmethoddescription", "Pay by Send Spend."); this.AddOrUpdatePluginLocaleResource("plugins.payments.sendspendmanual.paymentmethoddescription", "After checkout please authorize transaction with your phone."); //Abdul change this like 22/12/2017 at 10am. this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.Country.Required", "Country is required."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.PhoneNumber.Required", "Phone number is not valid"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.FMMManual.PhoneNumber.Wrong", "Phone number is not valid"); base.Install(); }