/// <summary>
        /// Initializes a new instance of the <see cref="BraintreePaymentMethodApiService"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        /// <param name="settings">
        /// The settings.
        /// </param>
        /// <param name="customerApiService">
        /// The customer api provider.
        /// </param>
        internal BraintreePaymentMethodApiService(IMerchelloContext merchelloContext, BraintreeProviderSettings settings, IBraintreeCustomerApiService customerApiService)
            : base(merchelloContext, settings)
        {
            Mandate.ParameterNotNull(customerApiService, "customerApiProvider");

            this._braintreeCustomerApiService = customerApiService;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BraintreeApiService"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        /// <param name="settings">
        /// The settings.
        /// </param>
        /// <remarks>
        /// Used for testing
        /// </remarks>
        internal BraintreeApiService(IMerchelloContext merchelloContext, BraintreeProviderSettings settings)
        {
            Mandate.ParameterNotNull(merchelloContext, "merchelloContext");
            Mandate.ParameterNotNull(settings, "settings");

            this._settings = settings;

            this.Initialize(merchelloContext);
        }
Ejemplo n.º 3
0
        public virtual void TestFixtureSetup()
        {
            this.TestCustomer = MerchelloContext.Current.Services.CustomerService.CreateCustomerWithKey(
                Guid.NewGuid().ToString(),
                "first",
                "last",
                "*****@*****.**");

            this.BraintreeProviderSettings = TestHelper.GetBraintreeProviderSettings();

            AutoMapperMappings.CreateMappings();

            this.Gateway = this.BraintreeProviderSettings.AsBraintreeGateway();

            this.BraintreeApiService = new BraintreeApiService(this.BraintreeProviderSettings);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreeCustomerApiService"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="settings">
 /// The settings.
 /// </param>
 internal BraintreeCustomerApiService(IMerchelloContext merchelloContext, BraintreeProviderSettings settings)
     : base(merchelloContext, settings)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreeCustomerApiService"/> class.
 /// </summary>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public BraintreeCustomerApiService(BraintreeProviderSettings settings)
     : this(Core.MerchelloContext.Current, settings)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreePaymentMethodApiService"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public BraintreePaymentMethodApiService(IMerchelloContext merchelloContext, BraintreeProviderSettings settings)
     : this(merchelloContext, settings, new BraintreeCustomerApiService(merchelloContext, settings))
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreePaymentMethodApiService"/> class.
 /// </summary>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public BraintreePaymentMethodApiService(BraintreeProviderSettings settings)
     : this(Core.MerchelloContext.Current, settings)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreeSubscriptionApiService"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="settings">
 /// The settings.
 /// </param>
 internal BraintreeSubscriptionApiService(IMerchelloContext merchelloContext, BraintreeProviderSettings settings)
     : base(merchelloContext, settings)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreeSubscriptionApiService"/> class.
 /// </summary>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public BraintreeSubscriptionApiService(BraintreeProviderSettings settings)
     : this(Core.MerchelloContext.Current, settings)
 {
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BraintreeApiService"/> class.
 /// </summary>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public BraintreeApiService(BraintreeProviderSettings settings)
     : this(MerchelloContext.Current, settings)
 {
 }