コード例 #1
0
 public BitpayPaymentProcessor(ILocalizationService localizationService,
                               IOrderTotalCalculationService orderTotalCalculationService,
                               ISettingService settingService,
                               BitpayPaymentSettings bitpaySettings, HttpContextBase httpContext,
                               CurrencySettings currencySettings, ICurrencyService currencyService, IWebHelper webHelper,
                               IOrderService orderService, ILogger logger)
 {
     _localizationService          = localizationService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _settingService   = settingService;
     _bitpaySettings   = bitpaySettings;
     _httpContext      = httpContext;
     _currencySettings = currencySettings;
     _currencyService  = currencyService;
     _webHelper        = webHelper;
     _orderService     = orderService;
     _logger           = logger;
 }
コード例 #2
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new BitpayPaymentSettings
            {
                UseSandbox       = true,
                TransactionSpeed = TransactionSpeed.High
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Bitpay.Fields.PairingCode", "Pairing Code");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Bitpay.Fields.PairingCode.Hint", "Pairing code to connect client to server. Found at bitpay.com/tokens");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Bitpay.Fields.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Bitpay.Fields.UseSandbox.Hint", "Go against the test environment");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Bitpay.Fields.TransactionSpeed", "Transaction Speed");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Bitpay.Fields.TransactionSpeed.Hint", "Speed at which the transaction gets confirmed");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Bitpay.PaymentMethodDescription", "Pay by using Bitcoin");

            base.Install();
        }