# MonnifyEase Library
------------
![Python Versions](https://img.shields.io/badge/python-3.9|3.10|3.11|3.12-blue)
MonnifyEase simplifies interacting with the Monnify payment gateway in Python.
It offers wrappers for various functionalities, streamlining payment processing
for your projects.
Monnify (owned by **Moniepoint**) is a Nigerian payment gateway that allows
businesses to accept payments easily and securely.
> 📝: Read more on Monnify api documentation: [Monnify API DOCUMENTATION](https://developers.monnify.com/api/)
> 📝: Read more on monnifyease api documentation: [MonnifyEase DOCUMENTATION](https://monnifyease.readthedocs.io/en/latest/)
## Getting Started
You should create a Monnify account to generate:
1. **Monnify Secret Key**
2. **Monnify Api Key**
3. **Monnify Merchant Code**
4. **Monnify Base URL**
You can see this in the *developer page >> API keys and Contracts section*.
> ⚠️: **Warning:** Do not expose your secret key, api key, merchant code, base url or
>commit your any to git, or use them in client-side code.
> 💡: **Take Note:** The Monnify SDK is to be used from your front-end when integrating using Monnify.
> ✅: **Good**: Set your secret key, api key, base url and merchant code in environment variables as seen:
> 1. *MONNIFY_SECRET_KEY=your-secret-key*
> 2. *MONNIFY_API_KEY=your-api-key*
> 3. *MONNIFY_SECRET_KEY=your-secret-key*
> 4. *MONNIFY_MERCHANT_CODE=your-merchant-code*
## Create a Virtual Environment
1. For Windows:
* Create virtual environment
```
py -m venv <environment_name>
```
* Activate the virtual environment
```
<environment_name>\Scripts\activate
```
2. For Unix/macOS
* Create virtual environment
```
python3 -m venv <environment_name>
```
* Activate the virtual environment
```
<environment_name>/bin/activate
```
----------------------------------------------------------------------
## Install monnifyease library:
* #### Install monnifyease using pip.
> pip install monnifyease
* #### Install monnifyease using pipx.
> pipx install monnifyease
* #### Install monnifyease using poetry.
> poetry add monnifyease
## If you want to download the sdist packages directly:
Download the wheel distribution file and install using pip
> pip install monnifyease-0.i.0-py3-none-any.whl
Download the source distribution file, and install using pip
> pip install monnifyease-0.i.0.tar.gz
## To get a development version of monnifyease
Clone from the ``dev`` branch GitHub repository, unzip and install:
> git clone -b dev https://github.com/cla-bit/MonnifyEase.git
> cd monnifyease
> pip install monnifyease
----------------------------------------------------------------------
## API usage
-------------------------------------------------------
### Making a Transaction [Synchronous]
If after setting your secret key in environment variables, for a synchronous transaction process
all you need to do is use the transaction API to make a transaction.
To create a transaction or initialize a transaction:
* import the Monnify API wrapper.
```python
from monnifyease import Monnify, Currency, MERCHANT_CODE
client = Monnify()
create_transaction = client.transactions.initialize_transaction(
amount=1000.00,
customer_name="Test Customer",
customer_email="test@gmal.com",
payment_reference="test123prod",
payment_description="Testing payment",
currency=Currency.NGN.value,
merchant_contract_code=MERCHANT_CODE,
# add other parameters here
)
print(f"Transaction Created: {create_transaction}")
```
> ✅: **Good**: You can check your Monnify account, go to the Transaction page, and you will see the transaction just created.
# Other Tools
Similar to calling the Monnify, you can also call other tools to make your work easy. For example:
* ### Currency Type
```python
from monnifyease import Currency
val1 = Currency.NGN.value
print(val1)
```
> "NGN"
See documentation for more: https://monnifyease.readthedocs.io/en/latest/
Raw data
{
"_id": null,
"home_page": null,
"name": "monnifyease",
"maintainer": "petermbachu.bincom",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": "petermbachu.bincom@gmail.com",
"keywords": "moniepoint, monnifyease, monnify, python, api, wrapper",
"author": "Peter Mbachu",
"author_email": "doublep098@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/31/f9/cad53a22f9fc8eeb3e136810a5ea163c4006d656dcb86381cfcf2ea5884b/monnifyease-0.2.0.tar.gz",
"platform": null,
"description": "# MonnifyEase Library\n\n------------\n\n![Python Versions](https://img.shields.io/badge/python-3.9|3.10|3.11|3.12-blue)\n\nMonnifyEase simplifies interacting with the Monnify payment gateway in Python. \nIt offers wrappers for various functionalities, streamlining payment processing \nfor your projects.\n\nMonnify (owned by **Moniepoint**) is a Nigerian payment gateway that allows \nbusinesses to accept payments easily and securely.\n\n\n> \ud83d\udcdd: Read more on Monnify api documentation: [Monnify API DOCUMENTATION](https://developers.monnify.com/api/)\n\n> \ud83d\udcdd: Read more on monnifyease api documentation: [MonnifyEase DOCUMENTATION](https://monnifyease.readthedocs.io/en/latest/)\n\n\n## Getting Started\n\nYou should create a Monnify account to generate: \n\n1. **Monnify Secret Key**\n2. **Monnify Api Key**\n3. **Monnify Merchant Code**\n4. **Monnify Base URL**\n\nYou can see this in the *developer page >> API keys and Contracts section*.\n\n> \u26a0\ufe0f: **Warning:** Do not expose your secret key, api key, merchant code, base url or \n>commit your any to git, or use them in client-side code.\n\n> \ud83d\udca1: **Take Note:** The Monnify SDK is to be used from your front-end when integrating using Monnify.\n\n> \u2705: **Good**: Set your secret key, api key, base url and merchant code in environment variables as seen: \n> 1. *MONNIFY_SECRET_KEY=your-secret-key*\n> 2. *MONNIFY_API_KEY=your-api-key*\n> 3. *MONNIFY_SECRET_KEY=your-secret-key*\n> 4. *MONNIFY_MERCHANT_CODE=your-merchant-code*\n\n\n## Create a Virtual Environment\n\n1. For Windows:\n\n * Create virtual environment\n\n ```\n py -m venv <environment_name>\n ```\n * Activate the virtual environment\n\n ```\n <environment_name>\\Scripts\\activate\n ```\n\n2. For Unix/macOS\n\n * Create virtual environment\n\n ```\n python3 -m venv <environment_name>\n ```\n * Activate the virtual environment\n\n ```\n <environment_name>/bin/activate\n ```\n\n----------------------------------------------------------------------\n\n## Install monnifyease library:\n\n\n* #### Install monnifyease using pip.\n\n> pip install monnifyease\n\n* #### Install monnifyease using pipx.\n\n> pipx install monnifyease\n\n* #### Install monnifyease using poetry.\n\n> poetry add monnifyease\n\n\n## If you want to download the sdist packages directly:\n\nDownload the wheel distribution file and install using pip\n\n> pip install monnifyease-0.i.0-py3-none-any.whl \n\nDownload the source distribution file, and install using pip\n\n> pip install monnifyease-0.i.0.tar.gz \n\n\n## To get a development version of monnifyease\n\nClone from the ``dev`` branch GitHub repository, unzip and install:\n\n> git clone -b dev https://github.com/cla-bit/MonnifyEase.git\n\n> cd monnifyease\n\n> pip install monnifyease\n\n----------------------------------------------------------------------\n\n## API usage\n\n-------------------------------------------------------\n\n### Making a Transaction [Synchronous]\n\nIf after setting your secret key in environment variables, for a synchronous transaction process \nall you need to do is use the transaction API to make a transaction. \n\nTo create a transaction or initialize a transaction:\n\n* import the Monnify API wrapper.\n\n```python\n\nfrom monnifyease import Monnify, Currency, MERCHANT_CODE\n\nclient = Monnify()\n\ncreate_transaction = client.transactions.initialize_transaction(\n amount=1000.00,\n customer_name=\"Test Customer\",\n customer_email=\"test@gmal.com\",\n payment_reference=\"test123prod\",\n payment_description=\"Testing payment\",\n currency=Currency.NGN.value,\n merchant_contract_code=MERCHANT_CODE,\n # add other parameters here\n)\n\nprint(f\"Transaction Created: {create_transaction}\")\n\n```\n\n> \u2705: **Good**: You can check your Monnify account, go to the Transaction page, and you will see the transaction just created.\n\n\n# Other Tools\nSimilar to calling the Monnify, you can also call other tools to make your work easy. For example:\n\n* ### Currency Type\n```python\n\nfrom monnifyease import Currency\n\nval1 = Currency.NGN.value\nprint(val1)\n\n```\n> \"NGN\"\n\nSee documentation for more: https://monnifyease.readthedocs.io/en/latest/\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "This is a Monnify API wrapper",
"version": "0.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/cla-bit/MonnifyEase/issues",
"Documentation": "https://monnifyease.readthedocs.io/en/latest/",
"Homepage": "https://github.com/cla-bit/MonnifyEase",
"Source Code": "https://github.com/cla-bit/MonnifyEase"
},
"split_keywords": [
"moniepoint",
" monnifyease",
" monnify",
" python",
" api",
" wrapper"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4f3d61a83ef6f56c7d817ea5ca084c36f16c4c04c3a3370411421e930008f923",
"md5": "46567cb2c5c2704ce34ae5b96e5e3940",
"sha256": "5ca7085e2993c71ef7a8e1b348878025e06c86e25b31eda7180190506a4646a6"
},
"downloads": -1,
"filename": "monnifyease-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "46567cb2c5c2704ce34ae5b96e5e3940",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 20195,
"upload_time": "2024-05-03T02:22:55",
"upload_time_iso_8601": "2024-05-03T02:22:55.803125Z",
"url": "https://files.pythonhosted.org/packages/4f/3d/61a83ef6f56c7d817ea5ca084c36f16c4c04c3a3370411421e930008f923/monnifyease-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "31f9cad53a22f9fc8eeb3e136810a5ea163c4006d656dcb86381cfcf2ea5884b",
"md5": "a6cf3d969079e3c524dc4d11fa7106ba",
"sha256": "82045fb9aa32566d4730937c27562c0e7811410d6ea11b7f6eebb0eef019ba34"
},
"downloads": -1,
"filename": "monnifyease-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "a6cf3d969079e3c524dc4d11fa7106ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 14169,
"upload_time": "2024-05-03T02:22:57",
"upload_time_iso_8601": "2024-05-03T02:22:57.403804Z",
"url": "https://files.pythonhosted.org/packages/31/f9/cad53a22f9fc8eeb3e136810a5ea163c4006d656dcb86381cfcf2ea5884b/monnifyease-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-03 02:22:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cla-bit",
"github_project": "MonnifyEase",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "monnifyease"
}