Logo Lanfrica

open-ug/ugmobilemoney-py

Domaine:

digital infrastructure

Type de record:

software
Créateur:
ope
Hôte:
UG Mobile Money is a python library for making mobile money transactions in Uganda. # UG MOBILE MONEY UG Mobile Money is a python library for making mobile money transactions in Uganda. It currently supports MTN MOMO and Yo Payments UG Mobile Money provides a simple interface for making mobile money transactions in a way that is similar to what the official MTN Mobile Money API provides but in a more pythonic and simple way. This makes it easy for beginners to get started and also for experienced developers who have been using the official API shift. The library also handles other underlying functions like encryption, Authorization and regenerating access tokens. This makes it easy for developers to focus on the business logic of their applications and not worry about the underlying details. The library utitlizes the Official MTN Mobile Money API. The API is documented here. ## Installation Use the package manager pip to install UG Mobile Money. ```sh pip install ugmobilemoney ``` After installing it you can now import the package in your project. ```python from mobile_money.momo import Collection, Disbursment ``` ## Usage This library is currently in development and only supports MTN MOMO. It supports the following operations: - Collection - Request to pay - Disbursment - Transfer > **Note:** You need to have an account with MTN MOMO and have your API user ID and API key. You can get these from the MTN MOMO Developer Portal. If your in sandbox environment, we provide utils for creation of API user ID and API key. ### Collection The UG Mobile Money library provides a `Collection` class that can be used to carry out operations or call the MOMO APIs provided under the collection Products. You access it from the `mobile_money.momo` module. ```py from mobile_money.momo import Collection collection = Collection( subscription_key=SUBSCRIPTION_KEY, api_user=API_USER, api_key=API_KEY, callback_url="mydomain.com", production=False, ) ``` ### Request to Pay Request to pay is a service that allows a merchant to rec …