Skip to content

Python client for ZarinPal payment gateway integration, facilitating easy payment requests and verifications

License

Notifications You must be signed in to change notification settings

hamidrezafarzin/zarinpal-payment-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Python client for ZarinPal payment gateway integration, facilitating easy payment requests and verifications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages