public void ConfigurationWithStringEnvironment_Initializes() { Configuration config = new Configuration( "development", "integration_merchant_id", "integration_public_key", "integration_private_key" ); BraintreeService service = new BraintreeService(config); var host = System.Environment.GetEnvironmentVariable("GATEWAY_HOST") ?? "localhost"; var port = System.Environment.GetEnvironmentVariable("GATEWAY_PORT") ?? "3000"; var expected = string.Format("http://{0}:{1}/merchants/integration_merchant_id", host, port); Assert.AreEqual(expected, service.BaseMerchantURL()); }
public BraintreeGateway(Configuration configuration) { Configuration = configuration; }
public BraintreeGateway(string clientId, string clientSecret) { Configuration = new Configuration(clientId, clientSecret); }
public BraintreeGateway(string accessToken) { Configuration = new Configuration(accessToken); }
public BraintreeGateway(Environment environment, string merchantId, string publicKey, string privateKey) { Configuration = new Configuration(environment, merchantId, publicKey, privateKey); }
public BraintreeGateway() { Configuration = new Configuration(); }
public BraintreeService(Configuration configuration) { this.Configuration = configuration; }
public BraintreeGateway(Environment environment) { configuration = new Configuration(environment); }
public void Proxy_ReturnsProxyConfiguration() { Configuration configuration = new Configuration( Environment.DEVELOPMENT, "integration_merchant_id", "integration_public_key", "integration_private_key" ); configuration.Proxy = "http://localhost:3000"; BraintreeService service = new BraintreeService(configuration); Assert.AreEqual("http://localhost:3000", service.GetProxy()); }