Skip to main content

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 .py file
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 to initSDK()

    Parameter Type Description
    status String Indicates the status of the payment. Possible values are: success, error
    reference String This is a unique identifier for the payment created. It is only returned when the status is success
  • KaizaException: Exceptions are thrown during your integration process. They are mostly issues surrounding the development process. Exceptions make use of the Python's Exception model which has the following parameters: following model:

    Parameter Type Description
    message String This is a short description of the exception

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kaizapy-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

kaizapy-0.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

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

Hashes for kaizapy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6125b861ccc4597a3caf4c30e866d08c638d36cc42557f485fbddf8b102a00f0
MD5 04989ed9379e6041aead7337bb6cdcff
BLAKE2b-256 b9d707f77e560b9ead048b00fcfcc35741541046a5f0ad0060ad7941a8b2680f

See more details on using hashes here.

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

Hashes for kaizapy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b00bc5b6ee2b61698bc6e0cfbb9c9837b898631c3024159b3f4fbfda915f8777
MD5 05bcd6f4c77e47e7b6f315c064772759
BLAKE2b-256 3849c69828770a0eb316dcaad63881f9313c2da991ce2ccd4526f022cd70006e

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