This Python package provides a simple interface for interacting with the ZarinPal payment gateway. It allows you to make payment requests, verify payments, and handle errors gracefully.
Project description
ZarinPal Payment Python Client
A Python client for integrating ZarinPal payment gateway into your Python applications.
Table of Contents
Introduction
This Python package provides a simple interface for interacting with the ZarinPal payment gateway. It allows you to make payment requests, verify payments, and handle errors gracefully.
Features
- Request payments with ease
- Verify payment transactions
- Graceful error handling for ZarinPal-specific errors
- ...
Installation
You can install the package using pip:
pip install zarinpal-payment-integration
Usage
from zarinpal.api import ZarinPalPayment
# Initialize ZarinPalPayment with your merchant_id and amount
payment_instance = ZarinPalPayment("your_merchant_id", 10000)
# Make a payment request
result = payment_instance.request_payment("your_callback_url", "Payment for something", "user_mobile", "user_email")
print(result)
# Verify a payment
verification_result = payment_instance.verify_payment("payment_authority")
print(verification_result)
Examples
For more detailed examples, check the examples directory in this repository.
Error Handling
The package includes robust error handling for ZarinPal-specific errors. For more information on error codes and messages, refer to the ZarinPal API documentation.
License
This project is licensed under the MIT License.
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 zarinpal-payment-integration-0.0.1.tar.gz.
File metadata
- Download URL: zarinpal-payment-integration-0.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9a8f0c8d4129199b9d7960b237b87a3b5c826083bbb75621238ff33299705ef
|
|
| MD5 |
448f118dcdaeaa888bcf584493f800e3
|
|
| BLAKE2b-256 |
e6dad9e4fbfea650a47e7b955ce3d01ac99db4e4054bb8e7bbadc464710d17be
|
File details
Details for the file zarinpal_payment_integration-0.0.1-py3-none-any.whl.
File metadata
- Download URL: zarinpal_payment_integration-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
550abbd81656942f453673e454f2c4a8bf01159a7b890448d2622f4354c03179
|
|
| MD5 |
6b67bc02960a474246bee9e5e66c560d
|
|
| BLAKE2b-256 |
17911bda838a063166ba35ad325fa75141c3e88e5f2d35d4bcaf1a6c4cb9d93f
|