CyberSource / cybersource-sdk-dotnet

.Net SDK for the CyberSource Simple Order API
Other
34 stars 53 forks source link

Don't use DefaultWebProxy in SoapClient #17

Closed mattmelling closed 2 years ago

mattmelling commented 8 years ago

I want to use the SoapClient with a proxy server that proxies requests just for Cybersource. We noticed in our staging environment that when using a proxy with the CS SDK, all web requests were sent through the proxy because of UseDefaultWebProxy = true, which is not desirable for us (for example we send requests to our hosting provider's API which we would prefer not to be proxied). This appears to be inconsistent with the XmlClient's behaviour.

To get around this I've set UseDefaultWebProxy = false, however this caused authentication errors on the proxy. I observed that it is possible to add credentials to TransactionProcessorClient.ClientCredentials and they are used when connecting to the proxy server.

This behaviour was observed by creating a new WebRequest in the SoapSample class and watching the proxies access log (squid3). After applying these changes, the extra WebRequest was not shown in the access logs.

I'm not a WCF guy so any feedback on this change would be greatly appreciated!

O-Mutt commented 7 years ago

This should at least get attention, if not pulled. +1

amie-gao commented 7 years ago

yes and we have this issue logged and will work on solution to fix the problem.