#Sébastien-proxy
1 messages · Page 1 of 1 (latest)
then https://github.com/stripe/stripe-dotnet/wiki/Advanced-client-usage should help!
Thank you so much
Hi again ! So I try to implement your solution but it seems to ignore my proxy. I don't know if you can take a look at the code but I just copy pasted it from the github. I don't really know what else I can try. I'm a bit lost actually.. ahah. Could you help me please ?
that feels like it should work
can you share the full code, like where you make the API request as well?
yeah sure
thanks for having a look
Server side code
Client side - Javascript (copied from stripe)
that feels like it should work really. let me test something quickly
ok thanks
it does work in general, e.g. this works(well actually it fails because I don't have a proxy in my environment, but you know what I mean).
static void proxyText()
{
var handler = new HttpClientHandler
{
Proxy = new WebProxy("http://local-proxy.net"),
UseProxy = true,
};
var httpClient = new HttpClient(handler);
var stripeClient = new StripeClient(
"sk_test_xx",
httpClient: new SystemNetHttpClient(httpClient)
);
StripeConfiguration.StripeClient = stripeClient;
var service = new CustomerService();
var customer = service.Create(new CustomerCreateOptions { Description = "test proxy customer" });
Console.WriteLine(customer.Id);
}
I don't really know anything about ASP or your "Configure" method or when that gets called though