コード例 #1
0
 public DaStripePaymentMethod(
     DaPaymentMethodManager paymentMethodManager,
     DaTenantManager tenantManager,
     DaAddressProfileManager addressProfileManager,
     DaSubscriptionManager subscriptionManager,
     DaCountryManager countryManager) : base(paymentMethodManager, tenantManager, addressProfileManager, subscriptionManager, countryManager)
 {
 }
コード例 #2
0
        public DaStripePaymentMethod(
            DaPaymentMethodManager <TKey, TPaymentMethod> paymentMethodManager,
            DaTenantManager <TKey, TNullableKey, TTenant> tenantManager,
            DaAddressProfileManager <TKey, TNullableKey, TAddressProfile> addressProfileManager,
            DaSubscriptionManager <TKey, TNullableKey, TSubscription> subscriptionManager,
            DaCountryManager <TKey, TNullableKey, TCountry, TCountryRegion> countryManager)
        {
            if (paymentMethodManager == null)
            {
                throw new ArgumentNullException(nameof(paymentMethodManager));
            }

            if (addressProfileManager == null)
            {
                throw new ArgumentNullException(nameof(addressProfileManager));
            }

            if (tenantManager == null)
            {
                throw new ArgumentNullException(nameof(tenantManager));
            }

            if (subscriptionManager == null)
            {
                throw new ArgumentNullException(nameof(subscriptionManager));
            }

            if (countryManager == null)
            {
                throw new ArgumentNullException(nameof(countryManager));
            }

            _paymentMethodManager  = paymentMethodManager;
            _tenantManager         = tenantManager;
            _addressProfileManager = addressProfileManager;
            _subscriptionManager   = subscriptionManager;
            _countryManager        = countryManager;

            StripeConfiguration.ApiKey = ConfigurationManager.AppSettings["Stripe:TestSecretKey"];
        }