# sajanpoddar/sslcommerz-lib-py architecture

> Architecture diagram of the GitHub repository sajanpoddar/sslcommerz-lib-py, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sajanpoddar/sslcommerz-lib-py
- Repository: https://github.com/sajanpoddar/sslcommerz-lib-py

## Overview

This is a small Python client wrapper for SSLCOMMERZ payments. An integrating application configures the client, then calls methods to create payment sessions, validate transactions or IPN data, query transactions, and manage refunds. Those API operations delegate HTTP requests to a shared dispatcher, which selects the sandbox or live gateway endpoint. The graph reflects the single sampled runtime module and README capabilities; it does not imply unshown gateway-side behavior.

Main entry points: [`sslcommerz_lib/sslcommerz.py`](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py) (HTTP dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Python client"]
  node_client_api["SSLCOMMERZ client<br/>[sslcommerz.py]"]
  node_create_session["Create session<br/>[sslcommerz.py]"]
  node_validate_transaction["Validate transaction<br/>[sslcommerz.py]"]
  node_validate_ipn["Validate IPN hash<br/>[sslcommerz.py]"]
  node_transaction_queries["Transaction queries<br/>[sslcommerz.py]"]
  node_refund_operations["Refund operations<br/>[sslcommerz.py]"]
  node_http_dispatcher["HTTP dispatcher<br/>[sslcommerz.py]"]
end

node_app(("Integrating application"))
node_gateway(("SSLCOMMERZ gateway"))

node_app -->|"configures"| node_client_api
node_app -->|"requests session"| node_create_session
node_app -->|"validates transaction"| node_validate_transaction
node_app -->|"validates IPN"| node_validate_ipn
node_app -->|"queries status"| node_transaction_queries
node_app -->|"manages refund"| node_refund_operations
node_create_session -->|"dispatches POST"| node_http_dispatcher
node_validate_transaction -->|"dispatches GET"| node_http_dispatcher
node_transaction_queries -->|"dispatches GET"| node_http_dispatcher
node_refund_operations -->|"dispatches GET"| node_http_dispatcher
node_http_dispatcher -->|"sends HTTP request"| node_gateway

click node_client_api "https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py"
click node_create_session "https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py"
click node_validate_transaction "https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py"
click node_validate_ipn "https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py"
click node_transaction_queries "https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py"
click node_refund_operations "https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py"
click node_http_dispatcher "https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client_api,node_create_session,node_validate_transaction,node_validate_ipn,node_transaction_queries,node_refund_operations,node_http_dispatcher toneBlue
class node_app,node_gateway toneIndigo
```

## Components

### Python client

- [SSLCOMMERZ client](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py): `sslcommerz_lib/sslcommerz.py`
- [Create session](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py): `sslcommerz_lib/sslcommerz.py`
- [Validate transaction](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py): `sslcommerz_lib/sslcommerz.py`
- [Validate IPN hash](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py): `sslcommerz_lib/sslcommerz.py`
- [Transaction queries](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py): `sslcommerz_lib/sslcommerz.py`
- [Refund operations](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py): `sslcommerz_lib/sslcommerz.py`
- [HTTP dispatcher](https://github.com/sajanpoddar/sslcommerz-lib-py/blob/master/sslcommerz_lib/sslcommerz.py): `sslcommerz_lib/sslcommerz.py`

### Other components

- **Integrating application**
- **SSLCOMMERZ gateway**

## Connections

- Integrating application → SSLCOMMERZ client: configures (evidence: `README.md`)
- Integrating application → Create session: requests session (evidence: `README.md`)
- Integrating application → Validate transaction: validates transaction (evidence: `README.md`)
- Integrating application → Validate IPN hash: validates IPN (evidence: `README.md`)
- Integrating application → Transaction queries: queries status (evidence: `README.md`)
- Integrating application → Refund operations: manages refund (evidence: `README.md`)
- Create session → HTTP dispatcher: dispatches POST (evidence: `sslcommerz_lib/sslcommerz.py`)
- Validate transaction → HTTP dispatcher: dispatches GET (evidence: `sslcommerz_lib/sslcommerz.py`)
- Transaction queries → HTTP dispatcher: dispatches GET (evidence: `sslcommerz_lib/sslcommerz.py`)
- Refund operations → HTTP dispatcher: dispatches GET (evidence: `sslcommerz_lib/sslcommerz.py`)
- HTTP dispatcher → SSLCOMMERZ gateway: sends HTTP request (evidence: `sslcommerz_lib/sslcommerz.py`)
