python-loovpay


Namepython-loovpay JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/Mounir-Holding-Tech/LoovPay-Python-SDK.git
SummaryLoovPay SDK for Python
upload_time2023-12-14 15:45:43
maintainer
docs_urlNone
authorDada Leonardo
requires_python>=3.10
licenseMIT
keywords python loovpay loovpay loov python-loovpay loovpay-python-sdk loov-solutions api-payment mobile-payment sdk payment
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

# LoovPay Python SDK

The LoovPay Python SDK allows you to integrate the LoovPay system into your Python applications. With this SDK, you can easily initiate and manage payments using mobile money or card payment methods. 

## Installation

You can install the LoovPay Python SDK using npm:

```bash
pip install python-loovpay
```


### `Requirements`

To use the LoovPay Python SDK, make sure you have the following required fields:

* amount: The payment amount in the specified currency.
* currency: The currency code of the payment amount.
* description: Description of the payment purpose.
* name: Customer name.
* email: Customer email.
* operator: The mobile operator code used for the payment (e.g., "orange-money-cm").
* phoneNumber: Customer phone number.
* return_url: URL to redirect after successful payment.
* cancel_url: URL to redirect if payment is canceled.
* callback_url: URL for payment notifications (webhook).
* payment_mode: The chosen payment mode. Values: ALL, CARD, MOBILE_MONEY.



## Usage

### `Pay In`

``` python
from python_loovpay import LoovPay

loov_pay = LoovPay()
loov_pay.set_keys('AppKey', 'MerchantKey')

pay_in_data = {
    'amount': 50000,
    'currency': 'XAF',
    'payment_mode': 'CARD',
    'return_url': 'https://google.com?state=return_url',
    'cancel_url': 'https://google.com?state=cancel',
    'callback_url': 'https://webhook.site/9c647add-6b43-4832-bd5d-db529c7c9b79',
    'description': 'test payment de service en ligne',
    'name': 'Arolle Fona',
    'email': 'arolle000@gmail.com',
    'phoneNumber': '237699009999'
}

response = loov_pay.pay_in(pay_in_data)
print(response)

```

#### `Success Response`

Upon successful payment initiation, the API will respond with a status code of 200 along with the following response body:

``` json
{
    "status": 200,
    "message": "Payment initiated",
    "payment_url": "https://api.secure.payment.loov-solutions.com/payinit/oa7DZzEd8gwJ5PYQ",
    "reference": "LOC8SXoZuDVEvu1ODxs"
}
```

### `Mobile SoftPay`

``` python

from python_loovpay import LoovPay

loov_pay = LoovPay()
loov_pay.set_keys('AppKey', 'MerchantKey')

mobile_pay_data = {
    'amount': 50000,
    'operator': 'XAF',
    'callback_url': 'https://webhook.site/9c647add-6b43-4832-bd5d-db529c7c9b79',
    'name': 'Arolle Fona',
    'email': 'arolle000@gmail.com',
    'phoneNumber': '237699009999'
}

response = loov_pay.mobile_soft_pay(mobile_pay_data)
print(response)

```

#### `Success Response`

Upon successfully initiating the mobile payment, the API will respond with a JSON object containing payment information.

``` json
{
    "error": false,
    "status": "success",
    "amount": "500",
    "fees": 10,
    "message": "Confirm the payment by entering your PIN code and you will receive an SMS. Thank you for using Orange Money services.",
    "reference": "LOMoac3hqZXuBHUHKy8"
}
```

### `Supported Operators`

| country | operator | operator_code | 
| ------- | -------- | ------------- |
| Benin | Mtn | mtn-benin | 
| Benin | Moov | moov-benin | 
| Cameroon | Orange | orange-money-cm | 
| Cameroon | Mtn  | mtn-cm | 
| Ivory Coast | Mtn | mtn-ci | 
| Ivory Coast | Moov | moov-ci | 
| Mali | Moov | moov-ml | 
| Mali | Orange | orange-money-ml | 
| Senegal | Orange | orange-money-senegal | 
| Senegal | Expresso | expresso-senegal |
| Senegal | Free | free-money-senegal | 
| Senegal | Wave Senegal  | wave-senegal | 
| Togo | T-money  | t-money-togo | 


### `Pay Out`

``` python

from python_loovpay import LoovPay

loov_pay = LoovPay()
loov_pay.set_keys('AppKey', 'MerchantKey')

payout_data = {
    'amount': 50000,
    'operator': 'orange-money-cm',
    'phoneNumber': '237699009999',
    'currency': 'XAF'
}

response = loov_pay.pay_out(payout_data)
print(response)


```

#### `Success Response`

Upon successfully initiating the mobile payment, the API will respond with a JSON object containing payment information.

``` json
{
    "error": false,
    "status": "success",
    "amount": "50000",
    "reference": "MOMAVzvTY7DLyiRCR38",
    "message": "Transfer of 500 XAF transferred to 237699009999"
}

```

### `Check Status`

``` python

from python_loovpay import LoovPay

loov_pay = LoovPay()
loov_pay.set_keys('AppKey', 'MerchantKey')

reference = 'MOMAVzvTY7DLyiRCR38'

response = loov_pay.check_status(reference)
print(response)


```

#### `Success Response`

Upon successfully retrieving the payment status, the API will respond with a JSON object containing the payment status information.

### `Check Status`

``` json
{
    "error": false,
    "reference": "your_reference",
    "amount": "500",
    "currency": "XAF",
    "status": "initiated",
    "date": "2023-08-08 09:08:17",
    "customer": null
}

```

### `Security Vulnerabilities`

If you discover a security vulnerability within the LoovPay Python SDK, please report it to `Leonardo Dada` via `dadaleonardo00@gmail.com`. We take security seriously and appreciate your help in disclosing any vulnerabilities responsibly.

### `License`

The LoovPay Python SDK is open-source software licensed under the MIT license. You can find the license details in the LICENSE file.

### `Credits`

This SDK was developed by `Leonardo Dada` with contributions from `Loov-Solutions`.

Special thanks to the `LoovPay` team for providing the necessary resources and support to create this Python SDK.

We hope this SDK simplifies the integration of `LoovPay Payment` into your Python applications and enables you to provide a seamless payment experience for your users. If you have any questions, issues, or suggestions, please feel free to open an issue on our GitHub repository. We appreciate your feedback and contributions to help make this SDK even better.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Mounir-Holding-Tech/LoovPay-Python-SDK.git",
    "name": "python-loovpay",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "python,loovpay,LoovPay,loov,python-loovpay,loovpay-python-sdk,loov-solutions,api-payment,mobile-payment,sdk,payment",
    "author": "Dada Leonardo",
    "author_email": "dadaleonardo00@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/93/b4/a2a9d02c1e6c0b7f20f54bf4e23014c0d0549da528daed8bbd4442d1bac8/python-loovpay-0.0.1.tar.gz",
    "platform": null,
    "description": "\n\n# LoovPay Python SDK\n\nThe LoovPay Python SDK allows you to integrate the LoovPay system into your Python applications. With this SDK, you can easily initiate and manage payments using mobile money or card payment methods. \n\n## Installation\n\nYou can install the LoovPay Python SDK using npm:\n\n```bash\npip install python-loovpay\n```\n\n\n### `Requirements`\n\nTo use the LoovPay Python SDK, make sure you have the following required fields:\n\n* amount: The payment amount in the specified currency.\n* currency: The currency code of the payment amount.\n* description: Description of the payment purpose.\n* name: Customer name.\n* email: Customer email.\n* operator: The mobile operator code used for the payment (e.g., \"orange-money-cm\").\n* phoneNumber: Customer phone number.\n* return_url: URL to redirect after successful payment.\n* cancel_url: URL to redirect if payment is canceled.\n* callback_url: URL for payment notifications (webhook).\n* payment_mode: The chosen payment mode. Values: ALL, CARD, MOBILE_MONEY.\n\n\n\n## Usage\n\n### `Pay In`\n\n``` python\nfrom python_loovpay import LoovPay\n\nloov_pay = LoovPay()\nloov_pay.set_keys('AppKey', 'MerchantKey')\n\npay_in_data = {\n    'amount': 50000,\n    'currency': 'XAF',\n    'payment_mode': 'CARD',\n    'return_url': 'https://google.com?state=return_url',\n    'cancel_url': 'https://google.com?state=cancel',\n    'callback_url': 'https://webhook.site/9c647add-6b43-4832-bd5d-db529c7c9b79',\n    'description': 'test payment de service en ligne',\n    'name': 'Arolle Fona',\n    'email': 'arolle000@gmail.com',\n    'phoneNumber': '237699009999'\n}\n\nresponse = loov_pay.pay_in(pay_in_data)\nprint(response)\n\n```\n\n#### `Success Response`\n\nUpon successful payment initiation, the API will respond with a status code of 200 along with the following response body:\n\n``` json\n{\n    \"status\": 200,\n    \"message\": \"Payment initiated\",\n    \"payment_url\": \"https://api.secure.payment.loov-solutions.com/payinit/oa7DZzEd8gwJ5PYQ\",\n    \"reference\": \"LOC8SXoZuDVEvu1ODxs\"\n}\n```\n\n### `Mobile SoftPay`\n\n``` python\n\nfrom python_loovpay import LoovPay\n\nloov_pay = LoovPay()\nloov_pay.set_keys('AppKey', 'MerchantKey')\n\nmobile_pay_data = {\n    'amount': 50000,\n    'operator': 'XAF',\n    'callback_url': 'https://webhook.site/9c647add-6b43-4832-bd5d-db529c7c9b79',\n    'name': 'Arolle Fona',\n    'email': 'arolle000@gmail.com',\n    'phoneNumber': '237699009999'\n}\n\nresponse = loov_pay.mobile_soft_pay(mobile_pay_data)\nprint(response)\n\n```\n\n#### `Success Response`\n\nUpon successfully initiating the mobile payment, the API will respond with a JSON object containing payment information.\n\n``` json\n{\n    \"error\": false,\n    \"status\": \"success\",\n    \"amount\": \"500\",\n    \"fees\": 10,\n    \"message\": \"Confirm the payment by entering your PIN code and you will receive an SMS. Thank you for using Orange Money services.\",\n    \"reference\": \"LOMoac3hqZXuBHUHKy8\"\n}\n```\n\n### `Supported Operators`\n\n| country | operator | operator_code | \n| ------- | -------- | ------------- |\n| Benin | Mtn | mtn-benin | \n| Benin | Moov | moov-benin | \n| Cameroon | Orange | orange-money-cm | \n| Cameroon | Mtn  | mtn-cm | \n| Ivory Coast | Mtn | mtn-ci | \n| Ivory Coast | Moov | moov-ci | \n| Mali | Moov | moov-ml | \n| Mali | Orange | orange-money-ml | \n| Senegal | Orange | orange-money-senegal | \n| Senegal | Expresso | expresso-senegal |\n| Senegal | Free | free-money-senegal | \n| Senegal | Wave Senegal  | wave-senegal | \n| Togo | T-money  | t-money-togo | \n\n\n### `Pay Out`\n\n``` python\n\nfrom python_loovpay import LoovPay\n\nloov_pay = LoovPay()\nloov_pay.set_keys('AppKey', 'MerchantKey')\n\npayout_data = {\n    'amount': 50000,\n    'operator': 'orange-money-cm',\n    'phoneNumber': '237699009999',\n    'currency': 'XAF'\n}\n\nresponse = loov_pay.pay_out(payout_data)\nprint(response)\n\n\n```\n\n#### `Success Response`\n\nUpon successfully initiating the mobile payment, the API will respond with a JSON object containing payment information.\n\n``` json\n{\n    \"error\": false,\n    \"status\": \"success\",\n    \"amount\": \"50000\",\n    \"reference\": \"MOMAVzvTY7DLyiRCR38\",\n    \"message\": \"Transfer of 500 XAF transferred to 237699009999\"\n}\n\n```\n\n### `Check Status`\n\n``` python\n\nfrom python_loovpay import LoovPay\n\nloov_pay = LoovPay()\nloov_pay.set_keys('AppKey', 'MerchantKey')\n\nreference = 'MOMAVzvTY7DLyiRCR38'\n\nresponse = loov_pay.check_status(reference)\nprint(response)\n\n\n```\n\n#### `Success Response`\n\nUpon successfully retrieving the payment status, the API will respond with a JSON object containing the payment status information.\n\n### `Check Status`\n\n``` json\n{\n    \"error\": false,\n    \"reference\": \"your_reference\",\n    \"amount\": \"500\",\n    \"currency\": \"XAF\",\n    \"status\": \"initiated\",\n    \"date\": \"2023-08-08 09:08:17\",\n    \"customer\": null\n}\n\n```\n\n### `Security Vulnerabilities`\n\nIf you discover a security vulnerability within the LoovPay Python SDK, please report it to `Leonardo Dada` via `dadaleonardo00@gmail.com`. We take security seriously and appreciate your help in disclosing any vulnerabilities responsibly.\n\n### `License`\n\nThe LoovPay Python SDK is open-source software licensed under the MIT license. You can find the license details in the LICENSE file.\n\n### `Credits`\n\nThis SDK was developed by `Leonardo Dada` with contributions from `Loov-Solutions`.\n\nSpecial thanks to the `LoovPay` team for providing the necessary resources and support to create this Python SDK.\n\nWe hope this SDK simplifies the integration of `LoovPay Payment` into your Python applications and enables you to provide a seamless payment experience for your users. If you have any questions, issues, or suggestions, please feel free to open an issue on our GitHub repository. We appreciate your feedback and contributions to help make this SDK even better.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "LoovPay SDK for Python",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Mounir-Holding-Tech/LoovPay-Python-SDK.git"
    },
    "split_keywords": [
        "python",
        "loovpay",
        "loovpay",
        "loov",
        "python-loovpay",
        "loovpay-python-sdk",
        "loov-solutions",
        "api-payment",
        "mobile-payment",
        "sdk",
        "payment"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31301fc52dcac66b16107aa1fa50ecc3e040993731b69d74076a36b8492457cf",
                "md5": "d88268f8ec763482a070a4d038f24b90",
                "sha256": "309e9c6add04f73bd0fe8d88d17e5e9e998ce0c0a26c350f5639d0e9b6046a8b"
            },
            "downloads": -1,
            "filename": "python_loovpay-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d88268f8ec763482a070a4d038f24b90",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6579,
            "upload_time": "2023-12-14T15:45:41",
            "upload_time_iso_8601": "2023-12-14T15:45:41.732752Z",
            "url": "https://files.pythonhosted.org/packages/31/30/1fc52dcac66b16107aa1fa50ecc3e040993731b69d74076a36b8492457cf/python_loovpay-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "93b4a2a9d02c1e6c0b7f20f54bf4e23014c0d0549da528daed8bbd4442d1bac8",
                "md5": "46b0480561407185aab2f8e26fcfcce5",
                "sha256": "f96de4dbc2e6c8526cfc9fb67e5d11aa9c029a33f09c25e190e9c3620db9e7d9"
            },
            "downloads": -1,
            "filename": "python-loovpay-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "46b0480561407185aab2f8e26fcfcce5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 6241,
            "upload_time": "2023-12-14T15:45:43",
            "upload_time_iso_8601": "2023-12-14T15:45:43.702032Z",
            "url": "https://files.pythonhosted.org/packages/93/b4/a2a9d02c1e6c0b7f20f54bf4e23014c0d0549da528daed8bbd4442d1bac8/python-loovpay-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-14 15:45:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Mounir-Holding-Tech",
    "github_project": "LoovPay-Python-SDK",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "python-loovpay"
}
        
Elapsed time: 0.15952s