コード例 #1
0
        public StripePaymentProcessor(CurrencySettings currencySettings,
                                      Services.IPaymentStripeService stripeService,
                                      HttpContextBase httpContext,
                                      ICheckoutAttributeParser checkoutAttributeParser,
                                      ICurrencyService currencyService,
                                      IGenericAttributeService genericAttributeService,
                                      ILocalizationService localizationService,
                                      IOrderTotalCalculationService orderTotalCalculationService,
                                      ISettingService settingService,
                                      ITaxService taxService,
                                      IWebHelper webHelper,
                                      StripePaymentSettings stripePaymentSettings,
                                      PaymentStripeObjectContext objectContext,
                                      IWorkContext workContext)
        {
            _currencySettings             = currencySettings;
            _httpContext                  = httpContext;
            _checkoutAttributeParser      = checkoutAttributeParser;
            _currencyService              = currencyService;
            _genericAttributeService      = genericAttributeService;
            _localizationService          = localizationService;
            _orderTotalCalculationService = orderTotalCalculationService;
            _settingService               = settingService;
            _taxService            = taxService;
            _webHelper             = webHelper;
            _stripePaymentSettings = stripePaymentSettings;
            _stripeService         = stripeService;
            _workContext           = workContext;
            _objectContext         = objectContext;

            // Set your secret key: remember to change this to your live secret key in production
            // See your keys here: https://dashboard.stripe.com/account/apikeys
            StripeConfiguration.SetApiKey(_stripePaymentSettings.StripeFrameworkSecretKey);
        }
コード例 #2
0
 public PaymentStripeController(IWorkContext workContext,
                                Services.IPaymentStripeService stripeService,
                                IShoppingCartService shoppingCartService,
                                IStoreService storeService,
                                ISettingService settingService,
                                IOrderService orderService,
                                ICountryService countryService,
                                IStateProvinceService stateProvinceService,
                                IOrderProcessingService orderProcessingService,
                                IGenericAttributeService genericAttributeService,
                                ILocalizationService localizationService,
                                IStoreContext storeContext,
                                ILogger logger,
                                IWebHelper webHelper,
                                PaymentSettings paymentSettings,
                                StripePaymentSettings stripePaymentSettings,
                                ShoppingCartSettings shoppingCartSettings,
                                IPaymentStripeFactory paymentStripeFactory,
                                IOrderTotalCalculationService orderTotalCalculationService,
                                IPaymentStripeCheckoutService paymentStripeCheckoutService,
                                IPaymentStripeCheckoutPlaceOrderService paymentStripeCheckoutPlaceOrderService,
                                IPaymentStripeRedirectionService paymentStripeRedirectionService,
                                IPaymentStripeEventService paymentStripeEventService)
 {
     this._workContext             = workContext;
     this._countryService          = countryService;
     this._stateProvinceService    = stateProvinceService;
     this._paymentStripeService    = stripeService;
     this._storeService            = storeService;
     this._settingService          = settingService;
     this._orderService            = orderService;
     this._paymentStripeFactory    = paymentStripeFactory;
     this._orderProcessingService  = orderProcessingService;
     this._genericAttributeService = genericAttributeService;
     this._localizationService     = localizationService;
     this._storeContext            = storeContext;
     this._logger                                 = logger;
     this._webHelper                              = webHelper;
     this._paymentSettings                        = paymentSettings;
     this._stripePaymentSettings                  = stripePaymentSettings;
     this._shoppingCartSettings                   = shoppingCartSettings;
     this._orderTotalCalculationService           = orderTotalCalculationService;
     this._paymentStripeCheckoutService           = paymentStripeCheckoutService;
     this._paymentStripeCheckoutPlaceOrderService = paymentStripeCheckoutPlaceOrderService;
     this._paymentStripeRedirectionService        = paymentStripeRedirectionService;
     _paymentStripeEventService                   = paymentStripeEventService;
 }