public SendSpendPaymentProcessor(ILocalizationService localizationService, IOrderTotalCalculationService orderTotalCalculationService, ISettingService settingService, ICurrencyService currencyService, ICustomerService customerService, IPaymentService paymentService, SendSpendPaymentSettings 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 SendSpendPaymentSettings { MerchantOrderAlive = 5, MerchantBaseUrl = _webHelper.GetStoreLocation(), NotifyUrl = _webHelper.GetStoreLocation() + "PaymentSendSpend/IPNHandler/?order={0}&status={1}", AppId = "2ee452f4-2ce8-483e-bd67-8d999cd5b33e", PreAuth = false }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.AppUrl", "Base App Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.MerchantAppId", "Merchant App Id"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.MerchantName", "Merchant Name"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.MerchantUniqueId", "Merchant UniqueId"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.MerchantBaseUrl", "Merchant Base Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.NotifyUrl", "Notify Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.ContinueUrl", "Continue Url"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.MerchantOrderAlive", "Order alive"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.PreAuth", "Required Pre Authorization"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.MerchantUniqueId.Hint", "Merchant wallet Id provided by SendSpend."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.MerchantOrderAlive.Hint", "Time to expire pending order; if user did not complete the transaction on time."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Fields.PreAuth.Hint", "Pre authorization required after customer payment."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Country", "Please select your country:"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.PhoneNumber", "Enter your registered phone number:"); //this.AddOrUpdatePluginLocaleResource("plugins.payments.sendspendmanual.paymentmethoddescription", "Pay by Send Spend."); this.AddOrUpdatePluginLocaleResource("plugins.payments.sendspend.paymentmethoddescription", "After checkout please authorize transaction with your phone."); //Abdul change this like 22/12/2017 at 10am. this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.Country.Required", "Country is required."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.PhoneNumber.Required", "Phone number is not valid"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SendSpend.PhoneNumber.Wrong", "Phone number is not valid"); base.Install(); }