shubhamchaudhary29 commented on code in PR #6261:
URL: https://github.com/apache/fineract/pull/6261#discussion_r3797579233
##########
fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java:
##########
@@ -406,8 +414,11 @@ public InteropTransferResponseData
prepareTransfer(@NonNull JsonCommand command)
savingsAccountRepository.save(savingsAccount);
}
- return InteropTransferResponseData.build(command.commandId(),
request.getTransactionCode(), InteropActionState.ACCEPTED,
- request.getExpiration(), request.getExtensionList(),
transferCode, DateUtils.getLocalDateTimeOfTenant());
+ LocalDateTime completedTimestamp =
DateUtils.getLocalDateTimeOfTenant();
+ InteropTransferResponseData response =
InteropTransferResponseData.build(command.commandId(),
request.getTransactionCode(),
+ InteropActionState.ACCEPTED, request.getExpiration(),
request.getExtensionList(), transferCode, completedTimestamp);
Review Comment:
My understanding was that this state represents the result of the operation,
not the transfer stage. The existing options are ACCEPTED and REJECTED. Since
both (prepare and commit) completed successfully, I used ACCEPTED for both.
The benefit is that it keeps the existing API behaviour unchanged, the
action tells us what happened (prepare or create), and the state tells us
whether it succeeded.
If this field is expected to represent the transfer stage instead, then
accepted is not enough and we would need separate values such as prepared and
commited.
Please correct me if my understanding is wrong.
--
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]