Skip to main content

A python library for ipay.

Project description

Publish ipay-python PyPI version License: MIT codecov Maintainability Test Coverage Documentation Status .github/workflows/pylint.yml

iPay Python SDK

ipay_logo

The iPay Python SDK provides a comprehensive set of tools for interacting with the iPay API, making it easier to integrate iPay payment functionality into your Python applications.

Description

This SDK simplifies the process of initiating payments, querying transaction status, and handling various iPay functionalities. It includes classes and methods for working with different iPay data models, making it convenient for developers to integrate iPay into their projects.

Table of Contents

Installation

Install the iPay Python SDK using pip:

pip install python-ipay

Usage

Importing the SDK

Import the SDK into your project:

from ipay import Ipay

Initializing the service

c2b = C2B()

C2B

from ipay import C2B
from ipay import IPayDataV1

c2b = C2B()
i_pay_data = IPayDataV1(
         live=0,
         oid="123456789",
         inv="123456789",
         amount=100,
         tel="254712345678",
         eml="johndoe@email.com",
         vid="demo",
         curr="KES",
         cst=1,
         cbk="http://localhost:8000/api/v1/ipn",
         crl=0,
         hash_value="",
         auto_pay=1
     )
c2b.initiate_payment(i_pay_data)

C2BV2

from ipay import C2BV2
from ipay import IPayDataV2

c2b = C2BV2()
i_pay_data = IPayDataV2(
         live=0,
         oid="123456789",
         inv="123456789",
         amount=100,
         tel="254712345678",
         eml="johndoe@email.com",
         vid="demo",
         curr="KES",
         cst=1,
         cbk="http://localhost:8000/api/v1/ipn",
         crl=0,
         hash_value="",
         auto_pay=1,
         p1="",
         p2="",
         p3="",
         p4="",
         cst="",
         crl="",
         hsh="",
         secret_key="demoCHANHED",
         )
link = c2b.initiate_payment(i_pay_data)["link"]

Configuration

You can set the following environment variables to configure the SDK:

  • i_pay_secret: Your iPay vendor secret key.

Contribution

Contributions are welcome! If you would like to contribute to the development of this SDK, please follow the guidelines in CONTRIBUTING.md. You can also contribute by reporting a bug or suggesting a feature you would like to see.

License

This SDK is licensed under the MIT License - see the LICENSE file for details.

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

python-ipay-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

python_ipay-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file python-ipay-0.1.0.tar.gz.

File metadata

  • Download URL: python-ipay-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for python-ipay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 09914c2c135cef74e80fb58064601beb640c3c65aa94fbc8577b4f3b4c6a9edf
MD5 00a6e44f1eb1d963a993a77c2b430c16
BLAKE2b-256 0e3d206e375dae4f9ff530b05304066e8ba346a0473416b2b3449291a3725ebb

See more details on using hashes here.

File details

Details for the file python_ipay-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: python_ipay-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for python_ipay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d94744800fe2c02818cb4d32d3ca713a3130ee77e7cb09fc9bee967890cd5af4
MD5 815b54496fde681e868da760c7cb8903
BLAKE2b-256 22de98b6ea6a24179d169eb8b0b7ae4de3f828bc596273088a0944d91eccc7ee

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