🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

ttk-epay

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ttk-epay

0.1.6
PyPI
Maintainers
1

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")

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts