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
Release history Release notifications | RSS feed
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
Close
Hashes for ktechpayapi-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f69bbc53d87b715e28179b6f8c9382660aefb1a704bf9ea23a8f2a5fb1fc6b43 |
|
MD5 | 886b750596b3fd241adba12ad91a5df3 |
|
BLAKE2b-256 | 254e4b44904ac0bfe119c29c502b6728b02cc4e60d57b2aae28cad3fa00df3c6 |