Mirabito RLM Pt.2 - Eniz Ozden; Korkut Balta; Muhammad Selim Albayrak;
From CS486wiki
Week 1: 02/14/2025
Accomplishments:
- Gave a presentation to project managers detailing our current status and outlining what needs to be done for the work ahead.
To-Do:
- Define the project scope.
- Work on Capture and Auth requests.
Week 2: 02/19/2025
Objectives and Tasks:
- Development Environment Configuration:
- Set up the C#/.NET environment. - Configure the TCP server and integrate XML parsing tools.
- Resource Access:
- Access Mirabito Lab resources. - Retrieve relevant log files, if available.
- TCP Listener Development:
- Develop an initial TCP listener capable of accepting and storing XML messages from POS devices.
- Connectivity Testing:
- Conduct basic connectivity tests using simulated POS requests.
- Logging Mechanism Implementation:
- Establish a comprehensive logging system to capture all incoming messages for further analysis.
Week 3: 02/26/2025
Objectives and Tasks:
- Message Processing:
- Develop XML parsing logic to extract key elements from AUTH and CAPTURE messages. - Implement handlers for AUTH and CAPTURE messages. - Implement Forwarding mechanism to capture correct response form the production server
- Response Handling:
- Develop a response generator to construct appropriate XML responses.
- System Validation:
- Conduct tests with sample message flows to verify server functionality to achieve correct response
- Expected Outcomes:
- A working system capable of processing AUTH and CAPTURE requests and generating appropriate responses.
- Deliverables:
- Functional XML parser and message handlers - Implementation of response generation logic.
Week 4: 03/05/2025
Objectives and Tasks:
- Frontend Development:
- Implement SendStatusRequest, SendAuthRequest, and SendCaptureRequest to send valid STATUS → AUTH → CAPTURE requests. - Develop ProcessStatusResponse, ProcessAuthResponse, and ProcessCaptureResponse to parse and validate incoming responses. - Modularize message sending with AddLengthPrefix, and unify receiving logic with ReceiveMessage.
- Sequence Handling:
- Enforce correct message sequence: STATUS → AUTH → CAPTURE. - Store AUTH response (e.g., CPERID, RewardID) for CAPTURE request construction.
- Testing:
- Verify client logic by observing communication using Wireshark. - Confirm prefix length format and proper server response to each message.
- Expected Outcomes:
- A complete client capable of sending and interpreting STATUS, AUTH, and CAPTURE messages correctly.
- Deliverables:
- Final version of FrontendClient.cs with modular, tested methods.
Week 5: 03/19/2025
Objectives and Tasks:
- Backend Development:
- Implement TCP server logic to accept client messages with 4-byte length prefixes. - Route incoming messages based on their operation type (STATUS, AUTH, CAPTURE).
- Implement business logic for each handler:
- STATUS → return APPROVED - AUTH → generate CPERID, apply rewards - CAPTURE → verify CPERID and return confirmation
- Response Generation:
- Serialize XML responses without unnecessary namespaces. - Use SendWithLengthPrefix to send consistent responses to the frontend.
- Testing:
- Validate integration with frontend client. - Confirm loyalty flow completion by simulating end-to-end transaction.
- Expected Outcomes:
- Backend system capable of handling complete STATUS → AUTH → CAPTURE flow with accurate responses.
- Deliverables:
- Final version of BackendApp.cs - Captured examples of each response type sent from backend
Week 6: 03/26/2025
Week 7: 04/02/2025
Objectives and Tasks:
- Codebase Restructuring:
- Reorganized the file structure for clarity, separating environments and logic (refer to Mirabito-RLM/README.md).
- Moved from testing scripts to a structured Environment directory for both frontend and backend components.
- Environment Update:
- Transitioned backend and frontend to run in a realistic server environment rather than isolated local scripts.
- Dynamic Status Check:
- Replaced hardcoded STATUS responses with a real-time API call to Conexus.
- If Conexus is reachable, the server automatically sends an APPROVED response to the client.
- Dynamic Auth Call:
- Integrated a live API call to Conexus during AUTH requests using the provided loyalty ID.
- Retrieved real-time discount/product info from Conexus based on the loyalty account.
Planned Tasks:
- Dynamic Response for Auth:
- Implement dynamic XML response construction using the data retrieved from the Conexus AUTH call.
- Populate response fields like rewards, CPERID, and discounts based on Conexus results.
- Dynamic Response for Capture:
- Build the CAPTURE response dynamically using the payload from Conexus's CAPTURE API.
- Ensure the XML reflects the correct transaction result and loyalty updates.
Expected Outcomes:
- Backend behavior that fully reflects Conexus API responses in real time.
- AUTH and CAPTURE messages dynamically generated with accurate loyalty and discount data.
Deliverables:
- Updated code in backend to support dynamic STATUS, AUTH, and CAPTURE flows.
- Refactored environment with clear separation of modules.
- Documented examples of Conexus API integration and resulting XML message flows.