Skip to main content

A python library to consume KtechPay API

Project description

ktechpay-python

Python plugin for Paystack View on pypi.python.org

Installation

pip install ktechpayapi

Instantiate KtechPay

from ktechpayapi.ktechpay import Kteckpay

test_secret_key = "kt_test_23cf0"

ktechpay = Kteckpay(test_key=test_secret_key)

# to use transaction class
print(ktechpay.testTransaction.list())

# initiate
print(ktechpay.testTransaction.initialize(
    amount=3,
    email="info@ktechhub.com"
))

print(ktechpay.testTransaction.verify(reference="e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7"))

S## tatic Use To start using the KtechPay Python API, you need to start by setting your secret key.

You can set your secret key in your environment by running:

export TESK_KEY = 'your_test_secret_key'
export PRODUCTION_KEY = 'your_production_secret_key'

After exporting the keys, you can use the api like this

from ktechpayapi.transaction import TestTransaction, ProductionTransaction

# to use transaction class
print(TestTransaction.list())

# initiate
print(TestTransaction.initialize(
    amount=3,
    email="info@ktechhub.com"
))

print(TestTransaction.verify(reference="e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7"))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ktechpayapi-0.0.3-py3.9.egg (7.3 kB view hashes)

Uploaded Source

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