amazon-pay-sdk-java
amazon-pay-sdk-java copied to clipboard
Proxy Settings without effect
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
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?
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:
- We are testing in sandbox mode and i think it is a http connection
- Even running the tomcat on https doesn't make any difference
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
Yes, thats what we found out, too. So perhaps the proxySet should be removed to avoid mistakes in implementation.
Kind regards, Daniel