[
https://issues.apache.org/jira/browse/FINERACT-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103333#comment-18103333
]
Shubham Chaudhary commented on FINERACT-2751:
---------------------------------------------
I looked further into the current implementation. My plan is to reuse the
existing savings transaction and payment-detail records for the transfer data,
while persisting a durable association between {{transactionCode}} and
{{{}transferCode{}}}.
The query endpoint would then use both codes to find and validate the transfer,
return {{{}InteropTransferResponseData{}}}, and return 404 for unknown or
mismatched codes. I would also correct the permission check and add integration
tests for prepared, committed and invalid transfers.
Before implementing this, I need confirmation on where the {{transactionCode}}
to {{transferCode}} association should be stored. Is there an existing domain
model that should hold it, or is a separate Interoperation transfer record
preferred?
> Implement the query transfer endpoint in the Interoperation API
> ---------------------------------------------------------------
>
> Key: FINERACT-2751
> URL: https://issues.apache.org/jira/browse/FINERACT-2751
> Project: Apache Fineract
> Issue Type: Bug
> Components: Migration Scripts
> Reporter: Shubham Chaudhary
> Priority: Major
>
> The Interoperation API provides the following endpoint to retrieve a transfer:
>
> {quote}{{GET
> /interoperation/transactions/\{transactionCode}/transfers/\{transferCode}}}
> {quote}
> However, {{InteropServiceImpl#getTransfer()}} is currently not implemented
> and returns {{{}null{}}}. Because of this, clients cannot check the details
> of a transfer after it has been prepared or committed.
> This is particularly an issue when the original transfer response is lost due
> to a timeout or network failure, as the client has no reliable way to confirm
> the result.
> There is also an incorrect permission check in
> {{{}InteropApiResource#getTransfer(){}}}. The endpoint currently checks
> {{{}ENTITY_NAME_QUOTE{}}}, but it should check {{{}ENTITY_NAME_TRANSFER{}}}.
> *Expected behaviour:*
> * Return the transfer matching the supplied {{transactionCode}} and
> {{{}transferCode{}}}.
> * Return HTTP {{404}} if the transfer does not exist or the two codes do not
> match.
> * Check read permission for {{{}ENTITY_NAME_TRANSFER{}}}.
> * Add integration tests for successful, unknown and mismatched transfer
> queries.
> The preferred method of retrieving or storing the relationship between the
> two codes may require maintainer feedback before implementation.
> *Relevant files:*
> * {{InteropServiceImpl.java}}
> * {{InteropApiResource.java}}
> * {{InteropTest.java}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)