Skip to main content

A python library to consume KtechPay API

Project description

ktechpay-python

Python plugin for KtechPay View on pypi.python.org

Installation

pip install ktechpayapi

Instantiate KtechPay

from ktechpayapi.ktechpay import Kteckpay

ktech_secret_key = "kt_test_23cf0"

ktechpay = Kteckpay(ktech_secret_key=ktech_secret_key)

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

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

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

Static 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 KTECH_SECRET_KEY = 'your_secret_secret_key'

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

from ktechpayapi.transaction import Transaction

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

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

print(Transaction.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-1.4.0-py3-none-any.whl (4.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