Skip to main content

A python app for paystack intergration

Project description

Paystack Python library

The Paystack Python library provides integration access to the Paystack Payments.

Dependencies

The Paystack Python SDK is tested against Python version 3.8

The Python core development community has released End-of-Life branches for Python versions 2.7 - 3.4, and are no longer receiving security updates. As a result, Paystack may not supports these versions of Python.

Documentation

Quick Start Example

import paystack

test_secret_key = "sk_test_<YOUR_SECRET_KEY>"
test_public_key = "pk_test_<YOUR_PUBLIC_KEY>"


gateway = paystack.paystack_gateway.PaystackGateway(
    secret_key=test_secret_key,
    public_key=test_public_key,
)

charge = gateway.Transaction.initiate({ 
    "email": "example@domain.com",
    "amount": "200000",
  })

# print the response to the terminal
print(charge)

# url to finalize the charge
url = charge.data.authorization_url

# verify a transaction with the response reference_key
gateway.Transaction.verify(charge.data.reference)

# check docs module for more intergration examples

Developing

using Virtualenv

  1. Create a virtualenv called venv:

    virtualenv venv
    
  2. Start the virtualenv:

    source venv/bin/activate
    
  3. Install dependencies:

    pip3 install -r dev_requirements.txt
    

Using pipenv

  1. install pipenv:

    pip3 install pipenv
    
  2. create a folder:

    mkdir <folder_name> && cd <folder_name>
    
  3. activate pipenv environment in new folder:

    pipenv -p python 3
    
  4. activate the virtual environment:

    pipenv shell
    
  5. install dependencies:

    pipenv install -r requirements.txt
    

See the LICENSE file for more info.

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

paystack-api-0.1.2.tar.gz (16.4 kB view hashes)

Uploaded Source

Built Distribution

paystack_api-0.1.2-py3-none-any.whl (33.6 kB view hashes)

Uploaded Python 3

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