Skip to main content

An unofficial python sdk for the QosIc platform.

Project description

An unofficial python sdk for the QosIC platform. This platform provides an api to enable mobile money payments for businesses in Africa.

https://img.shields.io/pypi/v/qosic-sdk.svg https://img.shields.io/pypi/pyversions/qosic-sdk Documentation Status https://img.shields.io/badge/license-MIT-blue.svg https://img.shields.io/badge/code%20style-black-000000.svg

Features

  • Simple synchronous client to make your payment requests

  • Cover 100% of Qosic public api

  • Clean and meaningful exceptions

  • 100 % test coverage

  • Configurable timeouts

Quickstart

For those of you in a hurry, here’s a sample code to get you started.

pip install qosic-sdk
from dotenv import dotenv_values
from qosic import Client, bj

config = dotenv_values(".env")

moov_client_id = config.get("MOOV_CLIENT_ID")
mtn_client_id = config.get("MTN_CLIENT_ID")

login = config.get("SERVER_LOGIN")
password = config.get("SERVER_PASSWORD")

def main():
    phone = "229XXXXXXXX"
    mobile_carriers = [bj.MTN(id=mtn_client_id), bj.MOOV(id=moov_client_id)]
    client = Client(login=login, password=password, mobile_carriers=mobile_carriers)

    result = client.pay(phone=phone, amount=500)
    print(result)
    if result.success:
        print(f"Everything went fine")

    result = client.refund(reference=result.reference, phone=phone)
    print(result)


if __name__ == "__main__":
    main()

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

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

qosic_sdk-5.1.0.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

qosic_sdk-5.1.0-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

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