sdk-java
sdk-java copied to clipboard
Environment not set. Set environment using setter or use overloaded method to pass appropriate environment
Hi all , I am stuck with an error while performing Payment using accept suite.
CreateTransactionController controller = new CreateTransactionController(apiRequest);
controller.execute();
Debugging the controller object, shows the following error
Environment not set. Set environment using setter or use overloaded method to pass appropriate environment
I am using the class
CreateAnAcceptPaymentTransaction
The version of the SDK I am using is v2.0.1 !
I' m setting the environment as the example, didn't change anything:
ApiOperationBase.setEnvironment(Environment.SANDBOX);
Any headsup will be really helpful!
If you did indeed follow the correct steps for setting the environment. It is very likely that you are using a JDK version that is higher than what is supported by Authnet.
If your logs give you ERROR net.authorize.util.HttpUtility - Execution error for http post Message: 'javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
that is because following Java 8 some dependencies are no longer include, but Authnet is expecting them to exist.