Python Easy Payment Gateway SDK.
Project description
Easy Payment Gateway (EPS) Client (hs_eps_gateway)
A lightweight and reusable Python client for interacting with the Easy Payment Gateway (EPS), designed to work in Django, Flask, FastApi and any standard Python environment.
🚀 Features
- Authenticate and retrieve access tokens from EPS
- Initialize new payments with product details
- Check full transaction logs
- Retrieve clean transaction status with parsed data
- Built-in error handling and JSON responses
📦 Installation
pip install hs-eps-gateway
Configuration (Environment Variables)
| Variable | Description |
|---|---|
| EPS_USERNAME | Your EPS account email |
| EPS_PASSWORD | Your EPS password |
| EPS_HASH_KEY | Provided hash key from EPS |
| EPS_MERCHANT_ID | Your merchant ID |
| EPS_STORE_ID | Your store ID |
| EPS_TOKEN_URL | (Optional) Auth URL (default provided) |
| EPS_INIT_PAYMENT_URL | (Optional) Payment init URL |
| EPS_VERIFY_URL | (Optional) Transaction verify URL |
🧠 Usage
-
Initialize Payment
from hs_eps_gateway.client import EPSClient from hs_eps_gateway.esp_types import ProductItem client = EPSClient() payload = { "CustomerOrderId": "ORDER1234544121a", "merchantTransactionId": "TXN2025072300144121a", "transactionTypeId": 1, "totalAmount": 10, "successUrl": "https://yoursite.com/success", "failUrl": "https://yoursite.com/fail", "cancelUrl": "https://yoursite.com/cancel", "customerName": "Test User", "customerEmail": "test@example.com", "CustomerAddress": "Dhaka", "CustomerCity": "Dhaka", "CustomerState": "Dhaka", "CustomerPostcode": "1230", "CustomerCountry": "BD", "CustomerPhone": "019XXXXXXXX", "ProductName": "Test Product", } products = [ ProductItem( ProductName="Product1", NoOfItem="1", ProductProfile="general", ProductCategory="test", ProductPrice="10" ) ] response = client.init_payment(payload, products) print(response)
-
Get Transaction Log
from hs_eps_gateway.client import EPSClient client = EPSClient() log = client.get_transaction_log("TXN2025072300144121a") print(log)
-
Get Transaction Status (Short Summary)
from hs_eps_gateway.client import EPSClient client = EPSClient() status = client.get_transaction_status("TXN2025072300144121a") print(status)
📄 License
MIT License.
🙋♂️ Author
Name: Himel Portfolio. Contributions are welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hs_eps_gateway-1.0.0.tar.gz.
File metadata
- Download URL: hs_eps_gateway-1.0.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c4cefa7e920fb48258e55faea0552ee6c751fbdea66684a68fa9dd886a6cdb0
|
|
| MD5 |
414e0d458a459b0ded440bb626398a6d
|
|
| BLAKE2b-256 |
68dfe329aca877803d76d7e25a8e2655736933eadcb596354fcaea691b328bab
|
File details
Details for the file hs_eps_gateway-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hs_eps_gateway-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a11aad069c1be1bc11a90d7e91bc0b711ff1300f434111c8a65ea7b0007e710
|
|
| MD5 |
3aef1d922241342ed3b56af249de0151
|
|
| BLAKE2b-256 |
696d966595aa65e7c4768d0335b1c06af5f15f0bf076f81ea281a6f12947cbc9
|