A KaizaPay package for accepting payments in your Python application
Project description
KaizaPY
A KaizaPay plugin for accepting payments in your Python application.
Requirements
KaizaPay Python SDK builds upon the recent patterns in Python, thus your app should target:
- Python >= 3.10.3
Getting Started
- Install the dependency in your project
pip install kaizapy
- Import the kaizapay SDK into your
.pyfile
from kaizapy import Kaiza, InitiatePaymentDTO
- Use the package
api_key="your_api_key"
api_secret="your_api_secret"
kaiza_sdk = Kaiza(api_key, api_secret)
try:
kaiza_sdk.init_sdk()
payment = kaiza_sdk.initiate_payment(InitiatePaymentDTO(amount=100, redirect_url="https://python.org"))
print(payment)
except Exception as e:
print(e)
Handling responses
The SDK produces two categories of responses - Payment objects and KaizaException objects
-
Payment object. It is returned when a call to
initiatePayment()is successful after a preceding call toinitSDK()Parameter Type Description statusString Indicates the status of the payment. Possible values are: success,errorreferenceString This is a unique identifier for the payment created. It is only returned when the statusissuccess -
KaizaException: Exceptions are thrown during your integration process. They are mostly issues surrounding the development process. Exceptions make use of the Python's
Exceptionmodel which has the following parameters: following model:Parameter Type Description messageString This is a short description of the exception
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kaizapy-0.0.1.tar.gz.
File metadata
- Download URL: kaizapy-0.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6125b861ccc4597a3caf4c30e866d08c638d36cc42557f485fbddf8b102a00f0
|
|
| MD5 |
04989ed9379e6041aead7337bb6cdcff
|
|
| BLAKE2b-256 |
b9d707f77e560b9ead048b00fcfcc35741541046a5f0ad0060ad7941a8b2680f
|
File details
Details for the file kaizapy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: kaizapy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b00bc5b6ee2b61698bc6e0cfbb9c9837b898631c3024159b3f4fbfda915f8777
|
|
| MD5 |
05bcd6f4c77e47e7b6f315c064772759
|
|
| BLAKE2b-256 |
3849c69828770a0eb316dcaad63881f9313c2da991ce2ccd4526f022cd70006e
|