braintree intergration

Hi,

I am new to backendless and mBaas & I need a little help with how to integrate the braintree server code so that I can make transactions and get tokens etc.
I have searched the internet for a solution but I cant seem to find any.

This is the guide that I need to follow to recieve tokens:
https://developers.braintreepayments.com/start/hello-server/java#generate-a-client-token

Client side it works and I use the token that they have provided hardcoded in my application:

I am sure that a simple guide/tutorial on how to implement braintree with java to backendless would help many of your developers.

Hi, Kasim!

Custom server logic can be implemented in two ways:

Hi Alex,

We have checked your recommendation but we still have to say that we have been unsuccessful following the custom service guide that you provided, Backendless gives us this error:

Can not parse generic service: BackendlessServerException: Undefined error, cause [CodeRunnerError] Code: 0; Msg: Error while parsing custom services jar file; Class: class com.backendless.coderunner.commons.exception.CodeRunnerException

We understand that this is because it cannot find the backendless.jar file that is included in our main jar file. that is how we have interpreted your guide.

We added our code to a class and then add the jars needed for the code to run to the main jar. We have included the braintree.jar & backendless.jar. but it gives us the same error however we compile our jar. Can you tell me how a xxxservice.jar file’s structure and it’s content should look like?

Regards,
Kasim

Hello!

backendless.jar shouldn’t be included to your archive. Exclude it, rebuild artifact and try again.
If it doesn’t help - please send us your jar at support@backendless.com so we can investigate your issue.
best regards,
Alex