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.4.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

payfast-0.1.4-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: payfast-0.1.4.tar.gz
  • Upload date:
  • Size: 5.4 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.4.tar.gz
Algorithm Hash digest
SHA256 07550f1be8a8f9454b769bdbdb9c4c90aed1f3b6f647ea9e048f0217eafa1457
MD5 52af9c70a0fb0bf061b12ccc163bc25f
BLAKE2b-256 5e3dda5c9dfaa3d54e3d531beb95c14ed1d2becfebe397729a6edddc7f8d838f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: payfast-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 60f25e622a399458a56d1d45f5a543cc640eaed37cd44335501b767a987b52da
MD5 caa7235c043aab4461776914340f94df
BLAKE2b-256 b00f06e9b928c4c239350b3aea45eaaf5aae7cd45fd7a34cbc71eaf7feec30ec

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