public override void Install()
        {
            //settings
            var settings = new GTpayPaymentSettings
            {
                UseSandbox             = false,
                MerchantID             = "1234",
                Interswitch_Merchantid = "1234",
                PostUrl               = "https://ibank.gtbank.com/GTPay/Tranx.aspx",
                IpnUrl                = "https://ibank.gtbank.com/GTPayService/gettransactionstatus.json",
                GTpayProductID        = "1234",
                GateWayName           = "webpay",
                ShowGateWayFirst      = "no",
                CurrencyCode          = "566",
                PdtValidateOrderTotal = true,
                HashCode              = "Your Hash Here...",
                EnableIpn             = true,
                AddressOverride       = true,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.RedirectionTip", "You will be redirected to payment site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.BusinessEmail", "Business Email");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.BusinessEmail.Hint", "Specify your PayPal business email.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.PDTToken", "PDT Identity Token");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.PDTToken.Hint", "Specify PDT identity token");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.PDTValidateOrderTotal", "PDT. Validate order total");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.PDTValidateOrderTotal.Hint", "Check if PDT handler should validate order totals.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.AdditionalFeePercentage", "Additional fee. Use percentage");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.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.GTpay.Fields.PassProductNamesAndTotals", "Pass product names and order totals to PayPal");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.PassProductNamesAndTotals.Hint", "Check if product names and order totals should be passed to PayPal.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.EnableIpn", "Enable IPN (Instant Payment Notification)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.EnableIpn.Hint", "Check if IPN is enabled.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.EnableIpn.Hint2", "Leave blank to use the default IPN handler URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.IpnUrl", "IPN Handler");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.IpnUrl.Hint", "Specify IPN Handler.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.Fields.AddressOverride", "Address override");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.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.GTpay.Fields.ReturnFromPayPalWithoutPaymentRedirectsToOrderDetailsPage", "Return to order details page");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.GTpay.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();
        }
 public GTpayPaymentProcessor(GTpayPaymentSettings GTpayPaymentSettings,
                              ISettingService settingService, ICurrencyService currencyService,
                              CurrencySettings currencySettings, IWebHelper webHelper,
                              ICheckoutAttributeParser checkoutAttributeParser, ITaxService taxService,
                              IOrderTotalCalculationService orderTotalCalculationService, HttpContextBase httpContext)
 {
     this._GTpayPaymentSettings         = GTpayPaymentSettings;
     this._settingService               = settingService;
     this._currencyService              = currencyService;
     this._currencySettings             = currencySettings;
     this._webHelper                    = webHelper;
     this._checkoutAttributeParser      = checkoutAttributeParser;
     this._taxService                   = taxService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._httpContext                  = httpContext;
 }