Skip to content

Commit 9a0a57a

Browse files
committed
Fixing proxy settings
1 parent 0fb9586 commit 9a0a57a

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ Running SampleCode without a parameter will give you the list of sample names.
3434

3535
Please set the JAVA environment proxy using a similar code :
3636
```
37-
System.setProperty("https.proxyUse", "true");
38-
System.setProperty("https.proxyHost", "127.0.0.1");
39-
System.setProperty("https.proxyPort", "3128");
37+
System.setProperty(Constants.HTTPS_USE_PROXY, "true");
38+
System.setProperty(Constants.HTTPS_PROXY_HOST, "127.0.0.1");
39+
System.setProperty(Constants.HTTPS_PROXY_PORT, "8888");
4040
```
4141
**For using proxy authentication**
4242

4343
Please set the JAVA environment proxy credentials using a similar code :
4444
```
45-
System.setProperty("https.proxyUserName", "exampleUsername");
46-
System.setProperty("https.proxyPassword", "examplePassword");
45+
System.setProperty(Constants.HTTPS_PROXY_USERNAME, "exampleUsername");
46+
System.setProperty(Constants.HTTPS_PROXY_PASSWORD, "examplePassword");
4747
```

src/main/java/net/authorize/sample/SampleCode.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.io.InputStreamReader;
66

77
import net.authorize.sample.VisaCheckout.*;
8+
import net.authorize.util.Constants;
89
import net.authorize.sample.PaymentTransactions.*;
910
import net.authorize.sample.PayPalExpressCheckout.*;
1011
import net.authorize.sample.PayPalExpressCheckout.Void;
@@ -152,11 +153,11 @@ private static void RunMethod(String methodName) {
152153
// Proxy server settings.
153154
// Enable these lines for using Sample Codes behind a proxy server
154155

155-
// System.setProperty("https.proxyUse", "true");
156-
// System.setProperty("https.proxyHost", "example.proxy.server");
157-
// System.setProperty("https.proxyPort", "portNumber");
158-
// System.setProperty("https.proxyUserName", "exampleUsername");
159-
// System.setProperty("https.proxyPassword", "examplePassword");
156+
// System.setProperty(Constants.HTTPS_USE_PROXY, "true");
157+
// System.setProperty(Constants.HTTPS_PROXY_HOST , "example.proxy.server");
158+
// System.setProperty(Constants.HTTPS_PROXY_PORT, "portNumber");
159+
// System.setProperty(Constants.HTTPS_PROXY_USERNAME, "exampleUsername");
160+
// System.setProperty(Constants.HTTPS_PROXY_PASSWORD, "examplePassword");
160161

161162
switch (methodName) {
162163
case "DecryptVisaCheckoutData":

0 commit comments

Comments
 (0)