コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckoutPaymentMethodControllerBase{TPaymentMethodModel}"/> class.
 /// </summary>
 /// <param name="checkoutPaymentMethodModelFactory">
 /// The <see cref="CheckoutPaymentMethodModelFactory{TPaymentMethodModel}"/>.
 /// </param>
 /// <param name="contextSettingsFactory">
 /// The <see cref="CheckoutContextSettingsFactory"/>.
 /// </param>
 protected CheckoutPaymentMethodControllerBase(
     CheckoutPaymentMethodModelFactory <TPaymentMethodModel> checkoutPaymentMethodModelFactory,
     CheckoutContextSettingsFactory contextSettingsFactory)
     : base(contextSettingsFactory)
 {
     Mandate.ParameterNotNull(checkoutPaymentMethodModelFactory, "checkoutPaymentMethodModelFactory");
     this.CheckoutPaymentMethodModelFactory = checkoutPaymentMethodModelFactory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckoutShipRateQuoteControllerBase{TShipRateQuote}"/> class.
 /// </summary>
 /// <param name="checkoutShipRateQuoteFactory">
 /// The <see cref="CheckoutShipRateQuoteModelFactory{TShipRateQuoteModel}"/>.
 /// </param>
 /// <param name="contextSettingsFactory">
 /// The <see cref="CheckoutContextSettingsFactory"/>.
 /// </param>
 protected CheckoutShipRateQuoteControllerBase(
     CheckoutShipRateQuoteModelFactory <TShipRateQuote> checkoutShipRateQuoteFactory,
     CheckoutContextSettingsFactory contextSettingsFactory)
     : base(contextSettingsFactory)
 {
     Ensure.ParameterNotNull(checkoutShipRateQuoteFactory, "checkoutShipRateQuoteFactory");
     this.CheckoutShipRateQuoteFactory = checkoutShipRateQuoteFactory;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckoutDiscountControllerBase{TDiscountModel,TLineItemModel}"/> class.
 /// </summary>
 /// <param name="checkoutDiscountModelFactory">
 /// The <see cref="CheckoutDiscountModelFactory{TDiscountModel,TLineItemModel}"/>.
 /// </param>
 /// <param name="contextSettingsFactory">
 /// The <see cref="CheckoutContextSettingsFactory"/>.
 /// </param>
 protected CheckoutDiscountControllerBase(
     CheckoutDiscountModelFactory <TDiscountModel, TLineItemModel> checkoutDiscountModelFactory,
     CheckoutContextSettingsFactory contextSettingsFactory)
     : base(contextSettingsFactory)
 {
     Mandate.ParameterNotNull(checkoutDiscountModelFactory, "checkoutDiscountFactory");
     this.CheckoutDiscountModelModelFactory = checkoutDiscountModelFactory;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckoutSummaryControllerBase{TSummary,TBillingAddress,TShippingAddress,TLineItem}"/> class.
 /// </summary>
 /// <param name="checkoutSummaryFactory">
 /// The <see cref="CheckoutSummaryControllerBase{TSummary, TBillingAddress, TShippingAddress, TLineItem}"/>.
 /// </param>
 /// <param name="contextSettingsFactory">
 /// The <see cref="CheckoutContextSettingsFactory"/>.
 /// </param>
 protected CheckoutSummaryControllerBase(
     CheckoutSummaryModelFactory <TSummary, TBillingAddress, TShippingAddress, TLineItem> checkoutSummaryFactory,
     CheckoutContextSettingsFactory contextSettingsFactory)
     : base(contextSettingsFactory)
 {
     Mandate.ParameterNotNull(checkoutSummaryFactory, "checkoutSummaryFactory");
     this.CheckoutSummaryFactory = checkoutSummaryFactory;
 }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CheckoutPaymentControllerBase{TPaymentModel}"/> class.
        /// </summary>
        /// <param name="checkoutPaymentModelFactory">
        /// The <see cref="CheckoutPaymentModelFactory{TPaymentModel}"/>.
        /// </param>
        /// <param name="contextSettingsFactory">
        /// The <see cref="CheckoutContextSettingsFactory"/>.
        /// </param>
        protected CheckoutPaymentControllerBase(
            CheckoutPaymentModelFactory <TPaymentModel> checkoutPaymentModelFactory,
            CheckoutContextSettingsFactory contextSettingsFactory)
            : base(contextSettingsFactory)
        {
            Ensure.ParameterNotNull(checkoutPaymentModelFactory, "checkoutPaymentModelFactory");
            this.CheckoutPaymentModelFactory = checkoutPaymentModelFactory;

            // ensures the sub class has a GatewayMethodUiAttribute
            EnsureAttribute();
        }
コード例 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CheckoutAddressControllerBase{TBillingAddress,TShippingAddress}"/> class.
        /// </summary>
        /// <param name="billingAddressFactory">
        /// The <see cref="CheckoutAddressModelFactory{TBillingAddress}"/>
        /// </param>
        /// <param name="shippingAddressFactory">
        /// The <see cref="CheckoutAddressModelFactory{TShippingAddress}"/>
        /// </param>
        /// <param name="contextSettingsFactory">
        /// The <see cref="CheckoutContextSettingsFactory"/>.
        /// </param>
        /// <param name="initializeFromCustomerAddress">
        /// A value indicating whether or not to attempt to initialize address forms with default customer address
        /// (if available)
        /// </param>
        protected CheckoutAddressControllerBase(
            CheckoutAddressModelFactory <TBillingAddress> billingAddressFactory,
            CheckoutAddressModelFactory <TShippingAddress> shippingAddressFactory,
            CheckoutContextSettingsFactory contextSettingsFactory,
            bool initializeFromCustomerAddress = true)
            : base(contextSettingsFactory)
        {
            Ensure.ParameterNotNull(billingAddressFactory, "billingAddressFactory");
            Ensure.ParameterNotNull(shippingAddressFactory, "shippingAddressFactory");

            this.BillingAddressFactory  = billingAddressFactory;
            this.ShippingAddressFactory = shippingAddressFactory;
            this._useCustomerAddress    = initializeFromCustomerAddress;
        }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreePaymentControllerBase{TPaymentModel}"/> class.
 /// </summary>
 /// <param name="checkoutPaymentModelFactory">
 /// The <see cref="BraintreePaymentModelFactory{TPaymentModel}"/>.
 /// </param>
 /// <param name="contextSettingsFactory">
 /// The <see cref="CheckoutContextSettingsFactory"/>.
 /// </param>
 protected BraintreePaymentControllerBase(
     BraintreePaymentModelFactory <TPaymentModel> checkoutPaymentModelFactory,
     CheckoutContextSettingsFactory contextSettingsFactory)
     : base(checkoutPaymentModelFactory, contextSettingsFactory)
 {
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckoutResolvePaymentController"/> class.
 /// </summary>
 /// <param name="contextSettingsFactory">
 /// The <see cref="CheckoutContextSettingsFactory"/>.
 /// </param>
 public CheckoutResolvePaymentController(CheckoutContextSettingsFactory contextSettingsFactory)
     : base(contextSettingsFactory)
 {
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckoutControllerBase"/> class.
 /// </summary>
 /// <param name="contextSettingsFactory">
 /// The checkout context settings factory.
 /// </param>
 protected CheckoutControllerBase(CheckoutContextSettingsFactory contextSettingsFactory)
 {
     Mandate.ParameterNotNull(contextSettingsFactory, "checkoutContextSettingsFactory");
     this._contextSettingsFactory = contextSettingsFactory;
 }