Hello,
Braintree involves integration of 2 methods. We solved the issue of the first method, however I am facing a different issue with the second method.
The method name is called PerformTransaction
public boolean performTransaction( String paymentNonce , double amount, String deviceData )
{
TransactionRequest request = new TransactionRequest()
.amount(new BigDecimal(amount))
.paymentMethodNonce(paymentNonce)
.deviceData(deviceData)
.options()
.submitForSettlement(true)
.done();Result result = gateway.transaction().sale(request);
Transaction transaction = result.getTarget();
Status status = transaction.getStatus();
return result.isSuccess();
}
I was able to run the code in debug mode (on the servver) and when I call it with the following param (from the console)
with PaymentNonce:
tokencc_bd_xcb823_sndybq_h3zjtq_sg26vm_k82
Amount: 2.0
DeviceData: deviceTest
Then it all works well and I get success.
When I deploy it to production and I call the code with the same param I get
400 - Type:"java.lang.NullPointerException", Description:"exception during method invocation", ExceptionClass:"ServiceException" {Msg:"none", Cause:"none"}
{
"code": 0,
"message": "Type:\"java.lang.NullPointerException\", Description:\"exception during method invocation\", ExceptionClass:\"ServiceException\" {Msg:\"none\", Cause:\"none\"}",
"errorData": {}
}
Attached is the zip filesample.zip (1.6 MB)
Can you please help me? Once I get that done then the integration is complete
Thank you