Skip to main content

Python library for Payfast by network API

Project description

Payfast Python library for Payfast by network API

The PayFast Payments Python Package is a comprehensive library designed to facilitate easy integration of PayFast payment solutions into Python applications. This package simplifies the process of implementing secure payments, subscription management, and transaction handling with the PayFast API.

Features

  • Easy Setup: Quick and straightforward setup process to integrate PayFast payments into your application.
  • Secure Payments: Implements secure payment processing using PayFast's security protocols.
  • Subscription Management: Manage recurring billing and subscriptions with ease.
  • Transaction Handling: Robust functions to handle transactions, including payments, refunds, and transaction history.
  • Webhook Support: Support for PayFast webhooks to receive real-time notifications about payment events.

Installation

Install the package using pip:

pip install payfast

Quick Start

from payfast.api import PayfastAPI

pf = PayfastAPI(merchant_id='your_merchant_id', merchant_key='your_merchant_key', passphrase='your_passphrase', sandbox=True)

payment_data = {
    'amount': 100.00,
    'item_name': 'Test Product',
    'item_description': 'A sample product description',
}

response = client.initiate_payment(payment_data)
if response.success:
    print("Payment initiated successfully.")
else:
    print("Payment initiation failed.")

Configuration

Before making any requests, configure the client with your PayFast merchant details. You can enable sandbox mode for testing purposes.

Documentation

For detailed documentation on all available methods and their usage, please refer to the official PayFast API documentation.

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository issue tracker.

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

payfast-0.1.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

payfast-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file payfast-0.1.3.tar.gz.

File metadata

  • Download URL: payfast-0.1.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for payfast-0.1.3.tar.gz
Algorithm Hash digest
SHA256 19b78eb6636ad90d4d4866143e6ac72ada2dbaccf241e8a4ceea6605d86ed7cd
MD5 ce164d01a25afe38eb7fd21c168ca5f0
BLAKE2b-256 f5abe8d983b08c1094546b3934aeaa37fcaf5e9b62fd57ffe606221557624ccf

See more details on using hashes here.

File details

Details for the file payfast-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: payfast-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for payfast-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 edeaf2f9ec4307034034176ade0d9b537a3b0a560bcfc7443f327c39e4655e0d
MD5 741e35e25208a87eea96dc287eb8eab9
BLAKE2b-256 5b120f06809445aae5c0d58cc0fb54eff6f8cb5b3d03bac6dabb6e89f0e06a1b

See more details on using hashes here.

Supported by

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