Skip to content

Latest commit

 

History

History
43 lines (38 loc) · 1.93 KB

File metadata and controls

43 lines (38 loc) · 1.93 KB

Changelog

2.0.0 (2026-07-22)

Breaking Changes

  • Complete rewrite with modern tooling and API design
  • PaydunyaClient(master_key, private_key, token, mode="test"|"live") replaces the old paydunya.debug and paydunya.api_keys module-level globals
  • OPR removed — the opr/create and opr/charge endpoints no longer exist in PayDunya's current documentation. Use the JavaScript-based PSR flow (documented at https://developers.paydunya.com/doc/EN/psr_plugins/api_psr) where your server creates a checkout invoice and returns the token
  • Pydantic v2 — all models (Store, InvoiceItem, Customer, Tax, Actions) are now Pydantic BaseModel classes with built-in validation (email format via EmailStr, amount bounds, positive quantity, required fields). Invalid input raises ValidationError at the SDK boundary instead of being sent to the API.
  • Python 3.10+ only (dropped all Python 2 and Python < 3.10 support)
  • httpx replaces requests

Added

  • DMP API — Payment Request API: send invoices via SMS/Email (DMP.create() / DMP.check_status())
  • IPN helperverify_ipn_hash() for SHA-512 hash verification on callbacks
  • Customer pre-fillInvoice.set_customer(name, email, phone) to pre-fill payment page fields
  • Docs-compliant items format — items now keyed as item_0, item_1, ... matching the official HTTP/JSON documentation
  • Sandbox E2E exampleexamples/sandbox_e2e.py with interactive payment confirmation polling
  • Type hints throughout, py.typed marker
  • Pytest-based test suite with httpx mocking (no network required)
  • MkDocs Material documentation in docs/

Changed

  • Package layout: src/paydunya/ (PEP 621)
  • Build system: hatchling instead of setuptools/setup.py
  • Linting: ruff replaces flake8/pep8/pyflakes
  • CI: GitHub Actions replaces Travis CI
  • uv for dependency management

1.0.7

  • Last stable release under the old architecture