An unofficial python sdk for the QosIc platform.
Project description
qosic-sdk
An unofficial python sdk for the QosIC platform. This platform provides an api to enable mobile money payments for businesses in Africa.
- Free software: MIT license
- Documentation: https://qosic-sdk.readthedocs.io.
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, MTN, MOOV
config = dotenv_values(".env")
moov_client_id = config.get("MOOV_CLIENT_ID")
mtn_client_id = config.get("MTN_CLIENT_ID")
server_login = config.get("SERVER_LOGIN")
server_pass = config.get("SERVER_PASSWORD")
# This is just for test purpose, you should directly pass the phone number
phone = config.get("PHONE_NUMBER")
def main():
client = Client(
login=server_login,
password=server_pass,
providers=[MTN(id=mtn_client_id), MOOV(id=moov_client_id)],
)
result = client.pay(phone=phone, amount=500, first_name="User", last_name="TEST")
print(result)
if result.success:
print(f"Everything went fine")
result = client.refund(reference=result.reference)
print(result)
if __name__ == "__main__":
main()
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
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
qosic-sdk-3.0.1.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for qosic_sdk-3.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dd230b6d742c8ec2d54602c420dfb78b73a165e2d0c3700aea74efd9c0a8e37 |
|
MD5 | ecda5c021766f0d5ef3fc49337cbf559 |
|
BLAKE2b-256 | 73df4dc41b81a63f879f12c54527051df2f0b89742dbe10fb0e11d17fadc75f6 |