Ejemplo n.º 1
0
        public BoletoPaymentProcessor(CurrencySettings currencySettings,
                                      ILocalizationService localizationService,
                                      ICheckoutAttributeParser checkoutAttributeParser,
                                      ICurrencyService currencyService,
                                      IGenericAttributeService genericAttributeService,
                                      IHttpContextAccessor httpContextAccessor,
                                      IPaymentService paymentService,
                                      ISettingService settingService,
                                      ITaxService taxService,
                                      IWebHelper webHelper,
                                      IWorkContext workContext,
                                      IStoreContext storeContext,
                                      BoletoPaymentSettings BoletoPaymentSettings)
        {
            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._BoletoPaymentSettings = BoletoPaymentSettings;
            this._workContext           = workContext;
            this._storeContext          = storeContext;

            this._clienteID       = _BoletoPaymentSettings.ClienteID;
            this._ClientSecret    = _BoletoPaymentSettings.ClientSecret;
            this._UrlNotification = _BoletoPaymentSettings.UrlNotification;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new BoletoPaymentSettings
            {
                UseSandbox = true

                             //TransactMode = TransactMode.Pending
            };

            _settingService.SaveSetting(settings);

            //locales
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Boleto.Instructions", "This payment method stores credit card information in database (it's not sent to any third-party processor). In order to store credit card information, you must be PCI compliant.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Boleto.Fields.AdditionalFee", "Additional fee");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Boleto.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Boleto.Fields.AdditionalFeePercentage", "Additional fee. Use percentage");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Boleto.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.Boleto.Fields.TransactMode", "After checkout mark payment as");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Boleto.Fields.TransactMode.Hint", "Specify transaction mode.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Boleto.PaymentMethodDescription", "Pay by credit / debit card");

            base.Install();
        }