cancel
Showing results for 
Search instead for 
Did you mean: 

Use proxy java sdk

Hi guys how can i use proxy in posting using anet java sdk via HttpClient? im using "HttpClient.setProxyIfRequested(client);" static method but still it says im not using proxy.

JeusChristian
Member
2 REPLIES 2

 

Hi JeusChristian,

 

Yes it is possible, all our SDKs have proxy capabilities built in. You can set the proxy details by configuring CONSTANTS.

 

Please check: 

https://github.com/AuthorizeNet/sdk-java/blob/fc6b763dde02ddc30d8b2f65747095ae08d722d8/anet-java-sdk...

 

Thanks,

Joy

Joy
Administrator Administrator
Administrator

Hi Joy,

 

I am using sample code from Anet ( https://github.com/AuthorizeNet/sample-code-java/blob/master/src/main/java/net/authorize/sample/Cust... ) , and I get a response (ANetApiResponse ) of 407 - Authentication Required , although I added proxy in environment(system obj System.setProperty ) and env variables as per API comments .

Can you please suggest if this issue is similar to what the thread is talking about .

How can I fix it , I am unable to test Java API in local using SANDBOX .

I ceated a SANDBOX account and passed LoginId,Transaction Key also cust ID created by calling the API directly from postman .

 

If i call https://apitest.authorize.net/xml/v1/request.api  in POSTMAN , with proxy i get responce .But with API code 407 AUTH REQ error .