APS - Transaction Processor

Methods

Process Transaction (Overloaded Method)

Method Detail

Value

Method Detail

Value

Visibility

Public

Method Parameters

AccountProcessingRequest, PayloadTracker

Return Value

Mono<AccountProcessingResponse>

Functionality

Retrieve the account number from the processing request and invoke the method that processes the transaction by Account Number.

Create the Account Processing Response object and return the response.

Process Transaction (Overloaded Method)

Method Detail

Value

Method Detail

Value

Visibility

Public

Method Parameters

AccountProcessingRequest, boolean (sentToMMS)

Return Value

AccountDto

Functionality

Check if the account dto is present in the processing request, then invoke the method that processes the transaction by account dto.

If the account dto is not present in the processing request, then invoke the method that processes the transaction by account number.

Return the created Account dto object.

Process Transaction By Account Dto

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameters

TransactionDto, AccountDto, boolean (sentToMMS)

Return Value

AccountDto

Functionality

  1. Convert the transaction dto into transaction entity and save the transaction in the database

  2. Invoke update account method in Account Service by passing the account dto, transaction dto and the transaction entity that was persisted.

Process Transaction By Account Number

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameters

TransactionDto, String (Account Number), boolean (sentToMMS)

Return Value

AccountDto

Functionality

  1. Convert the transaction dto into transaction entity and save the transaction in the database

  2. If account number passed as a parameter is not NULL, then it is an existing account in MMS and it needs to be updated. Invoke update account method in Account Service by passing the account number, transaction dto and the transaction entity that was persisted.

  3. If the account number passes is NULL, then the account does not exist in MMS, it has to be created. Invoke create account method in Account Service by passing the transaction dto and the transaction entity that was persisted.