{"id":21659423,"url":"https://github.com/rivo2302/Mvola","last_synced_at":"2025-07-17T22:32:09.979Z","repository":{"id":41485039,"uuid":"489122316","full_name":"rivo2302/Mvola","owner":"rivo2302","description":"A light Python module for  your API Mvola.","archived":false,"fork":false,"pushed_at":"2024-11-19T03:20:46.000Z","size":146,"stargazers_count":22,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-19T04:24:14.235Z","etag":null,"topics":["api","hacktoberfest","hacktoberfest2022","mvola","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/mvola/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rivo2302.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-05T20:50:12.000Z","updated_at":"2024-11-19T03:20:51.000Z","dependencies_parsed_at":"2023-01-24T11:00:11.212Z","dependency_job_id":null,"html_url":"https://github.com/rivo2302/Mvola","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivo2302%2FMvola","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivo2302%2FMvola/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivo2302%2FMvola/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivo2302%2FMvola/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rivo2302","download_url":"https://codeload.github.com/rivo2302/Mvola/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226305683,"owners_count":17603859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","hacktoberfest","hacktoberfest2022","mvola","python"],"created_at":"2024-11-25T09:31:02.390Z","updated_at":"2024-11-25T09:32:29.180Z","avatar_url":"https://github.com/rivo2302.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003c/br\u003e\n\u003c/br\u003e\n\u003cp align=\"center\"\u003e \n    \u003cimg height=\"400\" src=\"https://raw.githubusercontent.com/rivo2302/Mvola/master/assets/icon.png\"\u003e\n\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e \n    \u003cp\u003e\n        A \u003cb\u003elight\u003c/b\u003e Python module for your \u003ca href=\"https://www.mvola.mg/devportal/\"\u003e API Mvola \u003c/a\u003e.\n        \u003ch4\u003e\n            \u003ca href=\"https://pypi.org/project/mvola/\"\u003eDocumentation\u003c/a\u003e\n            \u003cspan\u003e | \u003c/span\u003e\n            \u003ca href=\"https://github.com/rivo2302/Mvola/issues\"\u003eReport bugs\u003c/a\u003e\n            \u003cspan\u003e | \u003c/span\u003e\n            \u003ca href=\"https://github.com/rivo2302/Mvola/fork\"\u003eContribute\u003c/a\u003e\n        \u003c/h4\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\n        \u003ca href='https://pypi.org/project/mvola/'\u003e\u003cimg src='https://img.shields.io/pypi/v/mvola?style=for-the-badge'/\u003e\u003c/a\u003e\n        \u003ca href='https://github.com/rivo2302/Mvola'\u003e \n            \u003cimg src=\"https://img.shields.io/badge/-python-396E9B?style=for-the-badge\u0026logo=python\u0026logoColor=FFFFFF\"/\u003e\n        \u003c/a\u003e\n        \u003ca href='https://pypi.org/project/mvola/'\u003e \n             \u003cimg src='https://img.shields.io/pypi/dm/mvola?label=DOWNLOADS\u0026style=for-the-badge'/\u003e\n        \u003c/a\u003e\n        \u003ca href='#'\u003e \n            \u003cimg src='https://img.shields.io/badge/Maintained-Yes-darkgreen?style=for-the-badge'/\u003e\n        \u003c/a\u003e  \n    \u003c/p\u003e\n\u003c/div\u003e\n\n## INSTALLATION\n\nYou can consult the link on pypi.org \u003ca href=\"https://pypi.org/project/mvola/\"\u003ehere\u003c/a\u003e for mode documentation.\n\n```s\npip install mvola==1.0.5\n```\n\n## USAGE \n\u003e Check the demo file \u003ca href=\"https://github.com/rivo2302/Mvola/blob/master/demo.py\"\u003ehere\u003c/a\u003e\n\n\n### Start the API \nCreate your account \u003ca href=\"https://www.mvola.mg/devportal/\"\u003ehere\u003c/a\u003e.\nAfter you create application , you should have Consummer_key and Consummer_secret and add those \nvariable in .env file(check the env file example).\n\n```python\n# Import the module mvola\nfrom mvola import Mvola\n\n# Import environ module to access environment variables\nfrom os import environ as env\n\n\n# Initiate the api =\u003e API(Consummer_key, Consummer_secret)\napi = Mvola(env.get('CONSUMER_KEY'), env.get('SECRET_KEY'))\n```\n\n### Generate token\nCheck the documentation \u003ca href=\"https://www.mvola.mg/devportal/apis/5fb6b560-ef7e-49ad-b3c7-5335b7ca45f6/documents/89b6b1d0-b3c9-4758-a548-47889825bc68\"\u003e here\u003c/a\u003e\n\n```python\nfrom mvola import Mvola\nfrom os import environ as env\napi = Mvola(env.get('CONSUMER_KEY'), env.get('SECRET_KEY'))\n\nres = api.generate_token()\nif res.success :\n    api.token = res\n    print(res)\nelse :\n    print(f\"Status_code[{res.status_code}] \\n {res.error}\")\n```\n\n###### OUTPUT\n\u003e Success\n```python\n    {\n        \"Success\": true,\n        \"Error\": null,\n        \"Status code\": 200,\n        \"Value\": {\n            \"access_token\": \"eyJ4NXQiOiJPRE5tWkRFMll6UTRNVEkxTVRZME1tSmhaR00yTUdWa1lUZGhOall5TWpnM01XTmpNalJqWWpnMll6bGpNRGRsWWpZd05ERmhZVGd6WkRoa1lUVm1OZyIsImtpZCI6Ik9ETm1aREUyWXpRNE1USTFNVFkwTW1KaFpHTTJNR1ZrWVRkaE5qWXlNamczTVdOak1qUmpZamcyWXpsak1EZGxZall3TkRGaFlUZ3paRGhrWVRWbU5nX1JTMjU2IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJyaXZvMjMwMkBnbWFpbC5jb21AY2FyYm9uLnN1cGVyIiwiYXV0IjoiQVBQTElDQVRJT04iLCJhdWQiOiIwekw3ZVRyU0VmWGY2a2t3SjUzRFNlZ0NiQndhIiwibmJmIjoxNjUyMDk2Mzc1LCJhenAiOiIwekw3ZVRyU0VmWGY2a2t3SjUzRFNlZ0NiQndhIiwic2NvcGUiOiJFWFRfSU5UX01WT0xBX1NDT1BFIiwiaXNzIjoiaHR0cHM6XC9cL2FwaW0ucHJlcC50ZWxtYS5tZzo5NDQzXC9vYXV0aDJcL3Rva2VuIiwiZXhwIjoxNjUyMDk5OTc1LCJpYXQiOjE2NTIwOTYzNzUsImp0aSI6Ijk0ZWRlZjIyLTFmYzEtNDYxNS05YzZjLWQxZGQ3MDg1NmFjYyJ9.MQ6ew1r7nMWZN3hI8Xvbv0PuZgsi-GY_IjsO-NeXmALh1KnwOOwhgo1cMu9hRGsXWg3XZexqLagLHRcjYNDXJKR6QuYrop6WzZuGMGsNs-PL_1jrjctOLIS2VGBL1utCdDvhvfYgG-oOs2cisBUIQ7TtHF8haTd0w4WdNVkxt66Jz5ZGhEbOBralbym3-Bgjo_2wbuKy9iY0x6xqr2xMuhPXkgTFyZmAqmUv32zIIyvfC6OiEcfcXF2T3Bm_NqJN8BNXXu8ST3sdU_dEp2wYEf5f4d8LxUygNVv5n9kkdlmLrRWpoEeWfpIcfAeMuMdyLaXAgQj-T7BInM5wECMhYg\",\n            \"scope\": \"EXT_INT_MVOLA_SCOPE\",\n            \"token_type\": \"Bearer\",\n            \"expires_in\": 3600\n        }\n    }\n```\n\n\u003e Failed [example]\n```python\n    Status_code[401] \n    {\n        'error_description': 'A valid OAuth client could not be found for client_id: 0zL7eTrSEfXf6kwJ53DSegCbBwa', \n        'error': 'invalid_client'\n    }\n```\nThe token generated by this function must expire after 3600s by default,to change that go to the dashboard of Mvola API Application in the plaform.\n\n### Initiate Transaction\nCheck the documentation \u003ca href=\"https://www.mvola.mg/devportal/apis/5fb6b560-ef7e-49ad-b3c7-5335b7ca45f6/documents/b36ca2a3-f339-43a1-88d3-bbee6c77b06f\"\u003e here\u003c/a\u003e\n\n```python\nfrom mvola.tools import Transaction\n\ntransaction = Transaction(\n    token=\"{{token}}\", # [Token] Requiered fields\n    user_language=\"FR\", # MG or FR\n    user_account_identifier=\"0343500003\", # [UserAccountIdentifier] Requiered fields \n    partner_name=\"Marketbot\", # Name of your application\n    amount=\"1500\",\n    x_callback_url=\"https://2809-102-16-43-64.ngrok.io\", # Webhook link for client , Mvola sends requests in this links once the transaction is finished \n    currency=\"Ar\", # Possible Values : Ar only\n    description_text=\"Unedescription\", # String (len\u003c40Characters)without special character\n    request_date=\"2022-05-06T02:14:59.567Z\", # Respect the consraints as in this example\n    debit=\"0343500003\", # [Debit] Required fields | Phone number of subscriber .In preprod it’s fixed: 034350003 or 0343500004\n    credit=\"0343500004\",  # [Credit] Required fields | Phone number of merchant. In preprod it’s fixed: 034350003 or 0343500004\n)\n\n# Init transaction\nres = api.init_transaction(transaction)\n\nif res.success :\n    print(res.response)\nelse :\n    print(f\"Status_code [{res.status_code}] \\n {res.error}\")\n```\n###### OUTPUT\n\u003e Success :\n```python\n    {\n        'status': 'pending', \n        'serverCorrelationId': '821ff7f5-43e2-4e6e-af47-a8c40150f950', \n        'notificationMethod': 'callback'\n    }\n```\n\n\u003e Failed [example]:\n```python\n    Status_code : [401] ,\n    {\n        'fault': {\n            'code': 900901, \n            'message': 'Invalid Credentials', \n            'description': 'Invalid Credentials. Make sure you have given the correct access token'\n        }\n    }\n```\n\n#### Status of Transaction\nCheck the documentation \u003ca href=\"https://www.mvola.mg/devportal/apis/5fb6b560-ef7e-49ad-b3c7-5335b7ca45f6/documents/b36ca2a3-f339-43a1-88d3-bbee6c77b06f\"\u003e here\u003c/a\u003e\n\n```python\n\nfrom mvola.tools import Transaction\n\ntransaction = Transaction(\n    token=\"{{token}}\", # [Token] Required fields\n    user_language=\"FR\", # MG or FR\n    user_account_identifier=\"0343500003\", # [UserAccountIdentifier] Required fields \n    partner_name=\"Marketbot\", # Name of your application\n    server_correlation_id='c8e9e922-b965-4515-b390-137b41c9f40b' , # [server_correlation_id] Required fields , The response when you initiate transaction\n)\n\n# Status of  transaction\nres = api.status_transaction(transaction)\n\nif res.success :\n    print(res.response)\nelse :\n    print(f\"Status_code [{res.status_code}] \\n {res.error}\")\n```\n###### OUTPUT\n\u003e Success :\n```python\n    {\n        \"status\": \"success\",\n        \"serverCorrelationId\": \"821ff7f5-43e2-4e6e-af47-a8c40150f950\",\n        \"notificationMethod\": \"callback\",\n        \"objectReference\": \"\"\n    }\n```\n\n\u003e Failed [example]:\n```python\n    Status_code : [401] ,\n    {\n        'status': '', \n        'serverCorrelationId': '821ff7f5-73e2-4e6e-af47-a8c40150f950', \n        'notificationMethod': '', \n        'objectReference': ''\n    }\n```\n\n\n#### Details of Transaction\nCheck the documentation \u003ca href=\"https://www.mvola.mg/devportal/apis/5fb6b560-ef7e-49ad-b3c7-5335b7ca45f6/documents/b36ca2a3-f339-43a1-88d3-bbee6c77b06f\"\u003e here\u003c/a\u003e\n\n```python\nfrom mvola.tools import Transaction\n\ntransaction = Transaction(\n    token=\"eyJ4NXQiOiJPRE5tWkRFMll6UTRNVEkxTVRZME1tSmhaR00yTUdWa1lUZGhOall5TWpnM01XTmpNalJqWWpnMll6bGpNRGRsWWpZd05ERmhZVGd6WkRoa1lUVm1OZyIsImtpZCI6Ik9ETm1aREUyWXpRNE1USTFNVFkwTW1KaFpHTTJNR1ZrWVRkaE5qWXlNamczTVdOak1qUmpZamcyWXpsak1EZGxZall3TkRGaFlUZ3paRGhrWVRWbU5nX1JTMjU2IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJyaXZvMjMwMkBnbWFpbC5jb21AY2FyYm9uLnN1cGVyIiwiYXV0IjoiQVBQTElDQVRJT04iLCJhdWQiOiIwekw3ZVRyU0VmWGY2a2t3SjUzRFNlZ0NiQndhIiwibmJmIjoxNjU0MTA4ODg2LCJhenAiOiIwekw3ZVRyU0VmWGY2a2t3SjUzRFNlZ0NiQndhIiwic2NvcGUiOiJFWFRfSU5UX01WT0xBX1NDT1BFIiwiaXNzIjoiaHR0cHM6XC9cL2FwaW0ucHJlcC50ZWxtYS5tZzo5NDQzXC9vYXV0aDJcL3Rva2VuIiwiZXhwIjoxNjU0MTEyNDg2LCJpYXQiOjE2NTQxMDg4ODYsImp0aSI6IjVlOGY5ZjFhLWUxODItNGZkMS04ZjUyLWU2YTIzMzljYTIzMCJ9.voIBGWbGiI7vFklcmHiufu5fW1UvlE79c7MNOZZisuGD7HQ8P4CFljBhbQQj8lHnd8u48KFdLxHWwg4SozDejPlTFmeDdHaE8UoYhTsVthYgG5eKN3ZSQ0LSyYyeLbxA25vssvVSkQBCX-4EtcrH_vgEnZiJotBqD8PhicuwtvJuiqm3lbkFcGpNNtVGlUD8Q_xxBt31Az044qJ3BYTcmnG1tXmjRzQNyNrGe3rnQxbnndqg1gHrr-st8bulgODHWGZ3vKkmpdXnMxAn6sYjPRZ0YOdfdQwpgYK8HpLh1oI8VtTsw8oqTiVXpk-4F00qXjqihVd66len-BS48DIsig\",\n    user_language=\"FR\",\n    user_account_identifier=\"0343500003\",\n    partner_name=\"Marketbot\",\n    transid=\"636251274\" # Transaction ID [Required] Fields on details transaction   \n)\nres = api.details_transaction(transaction)\nif res.success :\n    print(res.response)\nelse :\n    print(f\"Status_code [{res.status_code}] \\n {res.error}\")\n```\n###### OUTPUT\n```python\n    {\n        'amount': '5555.00', \n        'currency': 'Ar', \n        'requestDate': '2022-06-01T19:15:52.848Z', \n        'debitParty': \n            [\n                {\n                    'key': 'msisdn', \n                    'value': '0343500003'\n                }\n            ], \n        'creditParty': \n            [\n                {\n                    'key': 'msisdn', \n                    'value': '0343500004'\n                }\n            ], \n        'fees': \n            [\n                {'feeAmount': '84'}\n            ], \n        'metadata': \n            [\n                {\n                    'key': 'originalTransactionResult', \n                    'value': '0'\n                },\n                {\n                    'key': 'originalTransactionResultDesc', \n                    'value': '0'\n                }\n            ], \n        'transactionStatus': 'completed', \n        'creationDate': '2022-06-01T19:07:24.223Z', \n        'transactionReference': '636251282' , #This is the transaction ID\n    }\n\n```\n\n## How to contribute ?\n\n- Make a fork of the repository\n- TODO List \u003ca href=\"https://github.com/rivo2302/Mvola/issues/2\"\u003e #02 \u003c/a\u003e\n- Create a Pull Request \n\n## Contributors\n\n![Image des contributeurs GitHub](https://contrib.rocks/image?repo=rivo2302/Mvola)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frivo2302%2FMvola","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frivo2302%2FMvola","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frivo2302%2FMvola/lists"}