// SortedList<String, String> _responseFields = new SortedList<String, String>(new VPCStringComparer()); //String _secureSecret = "A3EFDFABA8653DF2342E8DAC29B51AF0"; public OnepayPaymentProcessor(OnepayPaymentSettings onepayPaymentSettings, ISettingService settingService, ICurrencyService currencyService, CurrencySettings currencySettings, IWebHelper webHelper, ICheckoutAttributeParser checkoutAttributeParser, ITaxService taxService, IOrderTotalCalculationService orderTotalCalculationService, HttpContextBase httpContext) { this._onePayPaymentSettings = onepayPaymentSettings; this._settingService = settingService; this._currencyService = currencyService; this._currencySettings = currencySettings; this._webHelper = webHelper; this._checkoutAttributeParser = checkoutAttributeParser; this._taxService = taxService; this._orderTotalCalculationService = orderTotalCalculationService; this._httpContext = httpContext; }
public override void Install() { Debug.WriteLine("Installlllllllllllllllll"); //settings var settings = new OnepayPaymentSettings { UseSandbox = true, BusinessEmail = "*****@*****.**", PdtToken = "Your PDT token here...", PdtValidateOrderTotal = true, EnableIpn = true, AddressOverride = true, }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.RedirectionTip", "You will be redirected to Onepay site to complete the order."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.UseSandbox", "Use Sandbox"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment)."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.BusinessEmail", "Business Email"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.BusinessEmail.Hint", "Specify your Onepay business email."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.PDTToken", "PDT Identity Token"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.PDTToken.Hint", "Specify PDT identity token"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.PDTValidateOrderTotal", "PDT. Validate order total"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.PDTValidateOrderTotal.Hint", "Check if PDT handler should validate order totals."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.AdditionalFeePercentage", "Additional fee. Use percentage"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.PassProductNamesAndTotals", "Pass product names and order totals to PayPal"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.PassProductNamesAndTotals.Hint", "Check if product names and order totals should be passed to PayPal."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.EnableIpn", "Enable IPN (Instant Payment Notification)"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.EnableIpn.Hint", "Check if IPN is enabled."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.EnableIpn.Hint2", "Leave blank to use the default IPN handler URL."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.IpnUrl", "IPN Handler"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.IpnUrl.Hint", "Specify IPN Handler."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.AddressOverride", "Address override"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.AddressOverride.Hint", "For people who already have PayPal accounts and whom you already prompted for a shipping address before they choose to pay with PayPal, you can use the entered address instead of the address the person has stored with PayPal."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.ReturnFromPayPalWithoutPaymentRedirectsToOrderDetailsPage", "Return to order details page"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Onepay.Fields.ReturnFromPayPalWithoutPaymentRedirectsToOrderDetailsPage.Hint", "Enable if a customer should be redirected to the order details page when he clicks \"return to store\" link on PayPal site WITHOUT completing a payment"); base.Install(); }