Following is an architecture that is designed to develop a payment platform for an organization(shown as 3rd party). Each and every entity has set of REST APIs. For the time being let's say I'm developing something like Paypal.
I have clearly marked the boundaries by vertical lines(red,blue). There are three parties involved. Payment portal, bank and 3rd party.
- Customer can initiate a transaction by log in to the payment portal. Payment portal will invoke the bank's API. Request flow is shown in the picture.
- Each and every request and response will go through the ESB and will be logged. If the transaction is successful ESB will update the 3rd party database and inform the payment portal at the same time.
- Payment portal will initiate another API call to the ESB to make sure that 3rd party database is updated correctly(not shown in the picture).
- At last payment portal will send an acknowledgement to the banks that the transaction has gone the full cycle(not shown in the picture). This is another API call.
The problem is what if the there is a network issue between two parties and it's unable to complete the truncation cycle. How it should be addressed?
Let's assume that network between payment portal and 3rd party is lost once the payment portal initiated the request. Payment portal will not be able to get the response even if the transaction is successful at the bank's end. Once the network is bank online how this should be handled?
I have read below.