/// <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; }
/// <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); }
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); }
/// <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) { }
/// <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) { }
/// <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) { }