![]() |
Banking_System_Server
1.0.0
Qt-based banking app for user/admin account management, transactions, secure server communication via PostgreSQL/Supabase.
|
The MakeTransactionRequest class handles transaction requests between accounts. More...
#include <MakeTransactionRequest.h>
Public Member Functions | |
MakeTransactionRequest () | |
Constructor for the MakeTransactionRequest class. More... | |
QJsonObject | execute (const QJsonObject &jsonObj, QMutex &m) override |
Executes the transaction request. More... | |
![]() | |
virtual | ~Request () |
Virtual destructor for the Request class. More... | |
Additional Inherited Members | |
![]() | |
bool | isDBConnectionValid (DB::DatabaseManager *dbManager) |
Checks if the database connection is valid. More... | |
QJsonObject | CreateDBConnectionError (QJsonObject &response, QJsonObject &dataObj) |
Creates a JSON response indicating a database connection error. More... | |
QJsonObject | CreateErrorResponse (QJsonObject &response, QJsonObject &dataObj, QString message) |
Creates a generic error JSON response. More... | |
The MakeTransactionRequest class handles transaction requests between accounts.
This class processes transaction requests, validates account details, and updates account balances.
|
inline |
Constructor for the MakeTransactionRequest class.
Initializes the DatabaseManager instance for handling database operations.
|
inlineoverridevirtual |
Executes the transaction request.
This method processes the JSON request to transfer funds between accounts. It checks the database for account validity and balance, updates the balances, and logs the transaction.
jsonObj | The JSON object containing the request data. |
m | The mutex to lock during the execution. |
Implements Request.