public BrainTreePaymentProvider(
     ITranslationService translationService,
     ICustomerService customerService,
     IServiceProvider serviceProvider,
     IHttpContextAccessor httpContextAccessor,
     BrainTreePaymentSettings brainTreePaymentSettings)
 {
     _translationService       = translationService;
     _customerService          = customerService;
     _serviceProvider          = serviceProvider;
     _httpContextAccessor      = httpContextAccessor;
     _brainTreePaymentSettings = brainTreePaymentSettings;
 }
Example #2
0
        public override async Task Install()
        {
            //settings
            var settings = new BrainTreePaymentSettings
            {
                UseSandBox = true,
                MerchantId = "",
                PrivateKey = "",
                PublicKey  = ""
            };
            await _settingService.SaveSetting(settings);

            //locales
            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Payments.BrainTree.FriendlyName", "BrainTree payment");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.Use3DS", "Use the 3D secure");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.Use3DS.Hint", "Check to enable the 3D secure integration");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.UseSandbox", "Use Sandbox");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.MerchantId", "Merchant ID");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.MerchantId.Hint", "Enter Merchant ID");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.PublicKey", "Public Key");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.PublicKey.Hint", "Enter Public key");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.PrivateKey", "Private Key");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.PrivateKey.Hint", "Enter Private key");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.AdditionalFee", "Additional fee");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers.");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.AdditionalFeePercentage", "Additional fee. Use percentage");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.DisplayOrder", "Display order");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.");

            await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.BrainTree.PaymentMethodDescription", "Pay by credit / debit card");


            await base.Install();
        }
 public BrainTreeWidgetProvider(ITranslationService translationService, BrainTreePaymentSettings brainTreePaymentSettings)
 {
     _translationService       = translationService;
     _brainTreePaymentSettings = brainTreePaymentSettings;
 }