Skip to main content

ZarinPal payment gateway plugin for Payman

Project description

payman-zarinpal

payman-zarinpal is a plugin for Payman that enables integration with the ZarinPal payment gateway. This package requires Payman >= 3.0.0.

Installation

pip install payman[zarinpal]

Quick Example

import asyncio

from payman import Payman
from zarinpal.models import PaymentRequest

pay = Payman("zarinpal", merchant_id="your-merchant-id")

async def main():
    req_params = PaymentRequest(
        amount=100_000,
        callback_url="https://example.com/callback",
        description="Test Payment",
        metadata={"email": "user@example.com", "mobile": "09123456789"},
    )

    response = await pay.initiate_payment(req_params)
    print(response.success, response.authority)

asyncio.run(main())

Links

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

payman_zarinpal-1.0.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

payman_zarinpal-1.0.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file payman_zarinpal-1.0.0.tar.gz.

File metadata

  • Download URL: payman_zarinpal-1.0.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for payman_zarinpal-1.0.0.tar.gz
Algorithm Hash digest
SHA256 61b1ea694367a82b9d54f79c27711637b0389959e5d69c08e99c4ff572bdc494
MD5 52cd23548a19ca1cb02734c3cf9acd10
BLAKE2b-256 8a7a6e8f71cd1923a43601210e2e6c9705f166504b52fdfa222231199a9dd974

See more details on using hashes here.

File details

Details for the file payman_zarinpal-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for payman_zarinpal-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fef27af24099690413b32e3586bf2ff11eda685eedc36b7b86aa47d05004a4e
MD5 56bc4ed011399f898a49478712e9583a
BLAKE2b-256 f7b60ce30133893feb2c8daaa91f551b90d5834155ee5af3df9ffb2688d50f52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page