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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file paystack-api-0.1.2.tar.gz.

File metadata

  • Download URL: paystack-api-0.1.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.2

File hashes

Hashes for paystack-api-0.1.2.tar.gz
Algorithm Hash digest
SHA256 53a9da4426abea1dbba5f1ba854df4bb38e02b89c0fafe8784503c559a648c5a
MD5 204686f738cc3d9bb802e87befd2d970
BLAKE2b-256 bd6c793b05669a989b4154cdc21725984e7fc817b5043c13f7d6e6741d19261c

See more details on using hashes here.

File details

Details for the file paystack_api-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: paystack_api-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.2

File hashes

Hashes for paystack_api-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1bd4560a0f8f33313ca97209d2ce42ea98a0c10c2609f9fe3a0a6d8951b3f482
MD5 327a27db9b0b772329ad780a0680d33a
BLAKE2b-256 22f33ae5a161d8f5e3ecc9e7f36923d0e59f143ec354346ecc052c90a8eeeca8

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