Hello,
I’m experimenting with adding a Braintree integration into the Business Logic. So I wrote a simple ApiService:
public class PaymentService implements IBackendlessService {
public String getClientToken() {
BraintreeGateway gateway = new BraintreeGateway(
Environment.SANDBOX,
"<merchantId>",
"<publicKey>",
"<privateKey>"
);
return gateway.clientToken().generate();
}
public String getTestException() {
return new BraintreeException("Exception").getMessage();
}
}
Creating service from uploaded .jar file went without any errors.
However executing GET /ClientToken returns an error:
400 - Type:“java.lang.NoClassDefFoundError”, Description:“Could not initialize class sun.security.ssl.SSLContextImpl$DefaultSSLContext”, ExceptionClass:“ServiceException” {Msg:“none”, Cause:“none”}
Executing GET /TestException works fine.
I’ve tried this service in both - Backendles v3 and v4 - non of them worked.
Can you please suggest what can I do to fix this issue? Is this because there can be some network requests to Braintree API?
Regards,
Matt