I am using Authorize.net as a Payment vendor in my application. After getting form token from Mobile SDK, I am using their Java SDK in Backend to initiate Payment.
But I am getting the following issue while using CreateAnAcceptPaymentTransaction
class from Authorize.net Java SDK(v2.0.1).
Environment not set. Set environment using setter or use overloaded method to pass appropriate environment
The controller object in the below line has the error.
CreateTransactionController controller = new CreateTransactionController(apiRequest);
I have already set the environment via the below piece of code
ApiOperationBase.setEnvironment(Environment.SANDBOX);
Tried to downgrade the version to v2.0.0
but it doesn't worked for me.
Any help would be really appreciated.