Ejemplo n.º 1
0
        public void SetWebProxy_DoesNotThrowUriException()
        {
            Configuration configuration = new Configuration(
                Environment.DEVELOPMENT,
                "integration_merchant_id",
                "integration_public_key",
                "integration_private_key"
                );

            configuration.WebProxy = new WebProxy("http://localhost:3000");

            BraintreeService service = new BraintreeService(configuration);

            try {
                service.Get(service.MerchantPath() + "/non-existent-route");
                Assert.Fail("Should have thrown exception");
            } catch (System.UriFormatException) {
                Assert.Fail("Setting WebProxy should not throw a URI exception");
            } catch (NotFoundException) {
                // expected
            }
        }
Ejemplo n.º 2
0
        public virtual PaymentMethodNonce Find(string nonce)
        {
            var response = new NodeWrapper(service.Get(service.MerchantPath() + "/payment_method_nonces/" + nonce));

            return(new PaymentMethodNonce(response, gateway));
        }