amzn / amazon-pay-sdk-java

Amazon Pay Java SDK
https://pay.amazon.com/documentation
Apache License 2.0
58 stars 51 forks source link

Proxy Settings without effect #22

Open DanielJ82 opened 6 years ago

DanielJ82 commented 6 years ago

Hello, i'm trying to integrate AmazonPay in our self developed shop system. We've tried to set the proxy settings with Config configkey = new PayConfig() {snip} .withProxyHost(OUR_PROXY) .withProxyPort(PROXY_PORT) .withProxyUsername("") .withProxyPassword("");

Client client = new PayClient(configkey);

With this configuration we get an Connection refused exception. If we use a VPN to for example a private computer the connection will be correctly established.

Kind regards, Daniel

bjguillot commented 6 years ago

Thanks for bringing this to our attention. Just so I'm clear, your proxy is not using username and password authentication? I wasn't sure if you redacted them on purpose for the purpose of posting this GitHub issue, or if by passing a blank you were attempting to convey you aren't using authentication.

Can you give us more information about what kind of proxy you have?

DanielJ82 commented 6 years ago

Yes this is correct. We just have to use the proxy without any authentication. I also tried connecting without setting anything in username and password. Additional info:

franrad commented 5 years ago

I have the same issue in the sandbox environment.

I suppose the problem is in the com.amazon.pay.impl.Util class because you are setting "http.proxyHost" and "http.proxyPort" system properties despite you are using the HTTPS protocol (https://mws-eu.amazonservices.com/OffAmazonPayments_Sandbox/2013-01-01)

You should set "https.proxyHost" and "https.proxyPort" system properties. Moreover, as far as I know, the "proxySet" property is useless

Thanks

DanielJ82 commented 5 years ago

Yes, thats what we found out, too. So perhaps the proxySet should be removed to avoid mistakes in implementation.

Kind regards, Daniel