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

If you're not sure about the file name format, learn more about wheel file names.

ktechpayapi-1.4.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file ktechpayapi-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: ktechpayapi-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.13

File hashes

Hashes for ktechpayapi-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d0b524ab0d442f0679d5d437565cac67db4142efc3f24dfc913f493caa616eb
MD5 c776397a5fad793358a2bfc45651c20c
BLAKE2b-256 19fcb7482a9034ac35612609b3b239aedb25b0e1a3b2424f4e200f8191080a29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page