wag-services-and-backend-la.../BankServices/ReadMe.md

1.2 KiB

BankServices

Requires the following environment variables to be set:

  • Postgres Service and Dependency
  • MongoDB Service and Dependency
  • Email Service and Dependency

/Configs /Services

uv init && uv add psycopg2-binary pymongo redbox

Reader Service

Reads given Mailbox and writes payload to MongoDB with the following format: Writes email payload to MongoDB with the following format: Collection Name: CollectedData|{XXXX-XX-XX}

{
  "email_id": "XXXXXXXXXXXXXXXX",
  "payload": {}
}

Parser Service

Reads email payload from MongoDB and parses the payload to extract the following fields: Writes parsed payload to MongoDB with the following format:

{
  "email_id": "XXXXXXXXXXXXXXXX",
  "iban": "XXXXXXXXXXXXXXXX",
  "bank_date": "XXXX-XX-XX",
  "channel_branch": "",
  "balance": "",
  "additional_balance": "",
  "process_name": "",
  "process_type": "",
  "process_comment": "",
  "bank_reference_code": ""
}

Sender Service

Reads parsed payload from MongoDB and writes to PostgresDb AccountRecords:

Email Service

Reads saved row from PostgresDb AccountRecords and sends email to the given email address with the following format: