No project description provided
Project description
ttk-epay-python-client
Welcome to Python Package Repository
for TTK ePay Payment Gateway
This package is developed by Charen Bahaeddine Hemmem (1hemmem) and is open to contributions from developers like you.
Requirements
TTK ePay requires Python 3.8 and above.
Installation
pip install ttk-epay
Usage
from ttk_epay import ttk_epay
from ttk_epay.models import Invoice, InvoiceDto
# Initialize the client
client = ttk_epay(base_url="https://pay.deploily.cloud/api/v1")
# ==============
# Invoice Management
# ==============
# Create an invoice
invoice_data = Invoice(
ID=123,
INVOICE_NUMBER=456,
NET_AMOUNT=100.0,
CLIENT_NAME="Client name",
CLIENT_MAIL="client@example.com"
)
created_invoice = client.create_invoice(invoice_data)
# Get paginated invoices
invoices = client.get_invoices(page_number=1, page_size=10)
# Get invoice by order ID
invoice = client.get_invoice_by_order_id("41")
# ==============
# Payment Processing
# ==============
# Create a payment
payment_data = InvoiceDto(
INVOICE_NUMBER=456,
NET_AMOUNT=100.0,
CLIENT_NAME="John Doe"
)
payment = client.post_payement(payment_data)
# Check payment status
status = client.get_payment_status("8LmjDNjisi0A5EAAGBYM")
# ==============
# Receipt Management
# ==============
# Get PDF receipt
pdf_response = client.get_pdf_recipt("8LmjDNjisi0A5EAAGBYM")
with open("receipt.pdf", "wb") as f:
f.write(pdf_response.content)
# Send receipt via email
result = client.send_pdf_recipt_mail("8LmjDNjisi0A5EAAGBYM", "client@example.com")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ttk_epay-0.1.6.tar.gz
(7.9 kB
view details)
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 ttk_epay-0.1.6.tar.gz.
File metadata
- Download URL: ttk_epay-0.1.6.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
515e8351043b63e559d93698e74f50e846ce35f6a95e5ecedb1bb8f9cff32e00
|
|
| MD5 |
c15df5a62fb8e98a54c22758e003e104
|
|
| BLAKE2b-256 |
4b22b2a62af90d380693c45dfa09752275807ced182de532f7803599e65b75d7
|
File details
Details for the file ttk_epay-0.1.6-py3-none-any.whl.
File metadata
- Download URL: ttk_epay-0.1.6-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4f8322fb1514711883f653f1b658461f42734c81e5ad9cca6988ca15c597706
|
|
| MD5 |
00f84e19db827cc59c95002e89fda0fb
|
|
| BLAKE2b-256 |
18da49fc354c6b0658fcdd7301e137a757aa6ed92e9690d9080420f3a00e4fcf
|