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 Distribution
ktechpayapi-1.3.0.tar.gz
(4.1 kB
view hashes)
Built Distributions
ktechpayapi-1.3.0-py3.10.egg
(7.0 kB
view hashes)
Close
Hashes for ktechpayapi-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | effbbac1fee431402092832e6e5a474236fd78b23be2666c21aea8819ecc588f |
|
MD5 | 4b463209d40505b3d4285df9c8edd133 |
|
BLAKE2b-256 | daccb156e3b088e905a1da96462b98c854b14c936ff1c3c1cb59292d9ab25da5 |