adamsaghy commented on code in PR #2614:
URL: https://github.com/apache/fineract/pull/2614#discussion_r984365753


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanEventApiJsonValidator.java:
##########
@@ -212,7 +212,39 @@ public void validateTransaction(final String json) {
         
baseDataValidator.reset().parameter(LoanApiConstants.REVERSAL_EXTERNAL_ID_PARAMNAME).ignoreIfNull().value(reversalExternalId)
                 .notExceedingLengthOf(100);
 
-        validatePaymentDetails(baseDataValidator, element);
+        validatePaymentDetails(baseDataValidator, element, false);
+        throwExceptionIfValidationWarningsExist(dataValidationErrors);
+    }
+
+    public void validateChargebackTransaction(final String json) {
+
+        if (StringUtils.isBlank(json)) {
+            throw new InvalidJsonException();
+        }
+
+        final Set<String> transactionParameters = new 
HashSet<>(Arrays.asList("transactionAmount", "externalId", "note", "locale",

Review Comment:
   Please extract this into a class level field.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to