Closed rifnijeleel closed 9 years ago
@rifnijeleel Per the oracle java docs a float is not a valid parameter for constructing a big decimal.
You can use a variety of other options, but we recommend using a string to create the BigDecimal.
Let us know if this does not address your issue.
Closing. @rifnijeleel feel free to reopen if you have further questions.
Service gateway returns me a TRANSACTION_AMOUNT_FORMAT_IS_INVALID if I pass a float decimal number.
TransactionRequest request = new TransactionRequest() .amount(new BigDecimal(0.10f));
this returns TRANSACTION_AMOUNT_FORMAT_IS_INVALID where as
TransactionRequest request = new TransactionRequest() .amount(new BigDecimal("0.10"));
returns a Approved, SUBMITTED_FOR_SETTLEMENT value.
this is how request parameter looks if you pass a float number transaction[amount]=0.100000001490116119384765625