コード例 #1
0
 public EPayPaymentProcessor(ISettingService settingService,
                             ICurrencyService currencyService, ICustomerService customerService,
                             CurrencySettings currencySettings, IWebHelper webHelper,
                             IStoreContext storeContext,
                             INotificationService notificationService,
                             IOrderTotalCalculationService orderTotalCalculationService, IWorkContext workContext, EPayPaymentSettings ePayPaymentSettings,
                             IOrderService orderService, ILocalizationService localizationService, IHttpContextAccessor httpContextAccessor, IGenericAttributeService genericAttributeService,
                             IPaymentService paymentService)
 {
     _settingService               = settingService;
     _currencyService              = currencyService;
     _customerService              = customerService;
     _currencySettings             = currencySettings;
     _notificationService          = notificationService;
     _webHelper                    = webHelper;
     _storeContext                 = storeContext;
     _orderTotalCalculationService = orderTotalCalculationService;
     _workContext                  = workContext;
     _ePayPaymentSettings          = ePayPaymentSettings;
     _orderService                 = orderService;
     _localizationService          = localizationService;
     _httpContextAccessor          = httpContextAccessor;
     _genericAttributeService      = genericAttributeService;
     _paymentService               = paymentService;
 }
コード例 #2
0
        public override void Install()
        {
            //settings
            var settings = new EPayPaymentSettings
            {
                UseSandbox    = true,
                EnableEasyPay = true,
                EnableEpay    = true
            };

            _settingService.SaveSetting(settings);

            //locales
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.UseSandbox", "Use Sandbox");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.CustomerNumber", "Dealer ID");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.CustomerNumber.Hint", "Specify the dealer ID.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.DealerEmail", "Dealer email");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.DealerEmail.Hint", "Specify the dealer email.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.SecretKey", "Dealer's secret key");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.ExpirationTimeDays", "Payment request expiration time");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.ExpirationTimeDays.Hint", "Set the payment request expiration time in days.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.SecretKey.Hint", "Specify the dealer's secret key.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.AdditionalFee", "Additional fee");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.AdditionalFeePercentage", "Additional fee. Use percentage");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.EnableEasyPay", "Enable EasyPay");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.EnableEasyPay.Hint", "Check to enable the EasyPay payment method.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.EnableEpay", "Enable ePay");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.EnableEpay.Hint", "Check to enable the ePay payment method.");

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message1", "If you're using this gateway ensure that your store supports the BGN currency. (Currency code should be BGN)");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message2", "1. Log into your ePay account as a merchant.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message3", "2. Click on Personal Information link.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message4", "3. Fill the bottom form with the data from this page.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message5", "4. Go to the Merchant Information field and click the Edit button.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message6", "5. Click the Edit button at the bottom.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message7", "6. For the notfication URL set http://www.yourStore.com/Plugins/PaymentEpay/PaymentDone");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message8", "NOTE: Please, don't forget to replace www.yourStore.com with the url of your store.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message9", "7. Click the Review button.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message10", "8. Click the Accept button.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Message11", "Your ePay plugin is now configured. Please don't forget to enable the ePay as a payment provider in your administration.");

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.EasyPayCode", "EasyPay Code");

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.NoPaymentMethodAvailable", "No payment method is available.");

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.EpayName", "Pay with ePay");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.EasyPayName", "Pay with EasyPay");

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.EasyPayError", "There was an error with the easy pay provider. Please check if the ePay settings are configured correctly. And are set for the selected enviroment (Sandbox or production)");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Title.Error", "Error");

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.OrderDescription", "Payment for order ");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.PaymentMethodDescription", "Pay by Epay / EasyPay card");

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.ePay.Fields.Configure.Suffix.Days", "days");

            base.Install();
        }