コード例 #1
0
        public override void Install()
        {
            //settings
            var settings = new GTPayPaymentSettings
            {
                UseSandbox       = true,
                DescriptionText  = "<p><b>GTPAY accepts both locally and internationally issued cards including Interswitch, MasterCard and VISA.</b><br /></p>",
                ShowCustomerName = true
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_DescriptionText, "Description");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_DescriptionText_Hint, "Enter info that will be shown to customers during checkout");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_DescriptionText_Required, "Description is required.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_SkipPaymentInfo, "Skip payment info");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_SkipPaymentInfo_Hint, "Gets a value indicating whether we should display a payment information page for this plugin.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_UseSandbox, "Use sandbox");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_UseSandbox_Hint, "Check to enable Sandbox (testing environment).");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_MerchantId, "Merchant identifier");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_MerchantId_Hint, "Specify merchant identifier.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_MerchantId_Required, "Merchant identifier is required.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_MerchantHashKey, "Merchant hash key");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_MerchantHashKey_Hint, "Specify merchant hash key provided by GTPay on merchant setup.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_MerchantHashKey_Required, "Merchant hash key is required.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_ShowGTPayPage, "Show GTPay page");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_ShowGTPayPage_Hint, "Check to show GTPay's own first page, from where the customer will click Continue to go to the gateway.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_PreferredGateway, "Preferred gateway");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_PreferredGateway_Hint, "If specified, then customer cannot choose what gateway to use for the transaction.");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_ShowCustomerName, "Show customer name");
            this.AddOrUpdatePluginLocaleResource(Constants.LocaleResources.GTPay_Fields_ShowCustomerName_Hint, "Check to display customer name on the payment page for the customer.");

            base.Install();
        }
コード例 #2
0
 public GTPayPaymentProcessor(CurrencySettings currencySettings,
                              ICheckoutAttributeParser checkoutAttributeParser,
                              ICurrencyService currencyService,
                              IGenericAttributeService genericAttributeService,
                              IHttpContextAccessor httpContextAccessor,
                              ILocalizationService localizationService,
                              IPaymentService paymentService,
                              ISettingService settingService,
                              ITaxService taxService,
                              IWebHelper webHelper,
                              GTPayPaymentSettings GTPayPaymentSettings,
                              IEncryptionService encryptionService,
                              ILogger logger,
                              ICustomerService customerService
                              )
 {
     this._currencySettings        = currencySettings;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._currencyService         = currencyService;
     this._genericAttributeService = genericAttributeService;
     this._httpContextAccessor     = httpContextAccessor;
     this._localizationService     = localizationService;
     this._paymentService          = paymentService;
     this._settingService          = settingService;
     this._taxService           = taxService;
     this._webHelper            = webHelper;
     this._GTPayPaymentSettings = GTPayPaymentSettings;
     this._encryptionService    = encryptionService;
     this._logger          = logger;
     this._customerService = customerService;
 }
コード例 #3
0
 public GTPayPaymentProcessor(GTPayPaymentSettings gtPayPaymentSettings,
                              ISettingService settingService,
                              IGenericAttributeService genericAttributeService,
                              ICurrencyService currencyService, ICustomerService customerService,
                              CurrencySettings currencySettings, IWebHelper webHelper,
                              IOrderTotalCalculationService orderTotalCalculationService,
                              IStoreContext storeContext,
                              ILocalizationService localizationService)
 {
     this._gtPayPaymentSettings    = gtPayPaymentSettings;
     this._settingService          = settingService;
     this._genericAttributeService = genericAttributeService;
     this._currencyService         = currencyService;
     this._customerService         = customerService;
     this._currencySettings        = currencySettings;
     this._webHelper = webHelper;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._storeContext        = storeContext;
     this._localizationService = localizationService;
 }