Metadata-Version: 2.1
Name: payfast
Version: 0.1.4
Summary: Python library for Payfast by network API
Home-page: https://github.com/intentio-software/payfast-python
Author: Max Dittmar
Author-email: Max Dittmar <max@intentio.co.za>
License: MIT License
        
        Copyright (c) 2024 Intentio (Pty) Ltd
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/intentio-software/payfast-python
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 3 - Alpha
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests >=2.0
Requires-Dist: pytz >=2021.1
Requires-Dist: pydantic <2.0,>=1.0

## 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:

```bash
pip install payfast
```

## Quick Start

```python
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.
