santimPay


NamesantimPay JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/nahom-d54/SantimPay.git
SummarySantimPay Unofficial package
upload_time2024-05-02 19:12:28
maintainerNone
docs_urlNone
authorNahom Dereje
requires_pythonNone
licenseMIT
keywords santimpay python paymentgateway ethiopiapaymentgateway
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SantimPay Python API Package.
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit)
Unofficial Python SDK for [SantimPay](https://santimpay.com/)

## Introduction

This document provides a comprehensive guide to integrating and using the SantimPay Payment Gateway SDK in your application. Santimpay is a powerful payment gateway that supports various payment methods, facilitating seamless transactions for businesses. This SDK simplifies interaction with SantimPay’s API, enabling operations such as initiating payments, verifying transactions, and managing subaccounts.

## Installation

To use the SantimPay SDK in your project, you need to install it using pip, as it is a dependency for making HTTP requests it will also install `httpx` as a dependency.

```bash
pip install santimPay
```
## Usage
To begin using the SDK, import the `SantimPay` class from the module and instantiate it with your secret key.
``` python
from santimPay import SantimPay
# Replace Your_merchant_id with your mechant_id from santimpay api

# Replace your private key with your own private key by generating it

# Replace test wit boolian value - default = False
santim_pay = SantimPay('Your_merchant_id', 'Your_private_key', test=False)

```
### Making Payments
#### Checkout pay
``` python
from santimPay.types import SantimPayCheckoutRequest, SantimPayOptions

request = SantimPayCheckoutRequest(
    id,
    amount,
    paymentReason,
    successRedirectUrl,
    failureRedirectUrl,
    notifyUrl,
    cancelRedirectUrl,
    direct = False
)

# options = SantimPayOptions()
response = santim_pay.checkout.create(
    request
)

print(response.jsonSerialize())
```

#### Direct pay
``` python
from santimPay.types import SantimPayCheckoutRequest, SantimPayOptions

request = SantimPayCheckoutRequest(
    id,
    amount,
    paymentReason,
    successRedirectUrl,
    failureRedirectUrl,
    notifyUrl,
    cancelRedirectUrl,
    direct = False
)

# options = SantimPayOptions()

# replace phonne_number with actual phone number
response = santim_pay.directpay.telebirr.create(
    request,
    phone_number
)
# or
response = santim_pay.directpay.cbe.create(
    request,
    phone_number
)

print(response.jsonSerialize())
```
## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. After that free to contribute to this project. Please read the [CONTRIBUTING.md](https://github.com/nahom-d54/SantimPay/blob/main/CONTRIBUTING.md) file for more information.


## Run Locally

Clone the project

```bash
git clone https://github.com/nahom-d54/SantimPay.git
```

Go to the project directory

```bash
cd santimPay
```

Install dependencies

```bash
pip install -r requirements.txt
```

## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nahom-d54/SantimPay.git",
    "name": "santimPay",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "SantimPay, Python, PaymentGateway, EthiopiaPaymentGateway",
    "author": "Nahom Dereje",
    "author_email": "dev@nahom.eu.org",
    "download_url": "https://files.pythonhosted.org/packages/77/a7/8bb94cdc6c6adf9079625fcc2bb5dc8b109d21d7901fe92ec5375bfe2739/santimPay-1.0.1.tar.gz",
    "platform": null,
    "description": "# SantimPay Python API Package.\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit)\r\nUnofficial Python SDK for [SantimPay](https://santimpay.com/)\r\n\r\n## Introduction\r\n\r\nThis document provides a comprehensive guide to integrating and using the SantimPay Payment Gateway SDK in your application. Santimpay is a powerful payment gateway that supports various payment methods, facilitating seamless transactions for businesses. This SDK simplifies interaction with SantimPay\u00e2\u20ac\u2122s API, enabling operations such as initiating payments, verifying transactions, and managing subaccounts.\r\n\r\n## Installation\r\n\r\nTo use the SantimPay SDK in your project, you need to install it using pip, as it is a dependency for making HTTP requests it will also install `httpx` as a dependency.\r\n\r\n```bash\r\npip install santimPay\r\n```\r\n## Usage\r\nTo begin using the SDK, import the `SantimPay` class from the module and instantiate it with your secret key.\r\n``` python\r\nfrom santimPay import SantimPay\r\n# Replace Your_merchant_id with your mechant_id from santimpay api\r\n\r\n# Replace your private key with your own private key by generating it\r\n\r\n# Replace test wit boolian value - default = False\r\nsantim_pay = SantimPay('Your_merchant_id', 'Your_private_key', test=False)\r\n\r\n```\r\n### Making Payments\r\n#### Checkout pay\r\n``` python\r\nfrom santimPay.types import SantimPayCheckoutRequest, SantimPayOptions\r\n\r\nrequest = SantimPayCheckoutRequest(\r\n    id,\r\n    amount,\r\n    paymentReason,\r\n    successRedirectUrl,\r\n    failureRedirectUrl,\r\n    notifyUrl,\r\n    cancelRedirectUrl,\r\n    direct = False\r\n)\r\n\r\n# options = SantimPayOptions()\r\nresponse = santim_pay.checkout.create(\r\n    request\r\n)\r\n\r\nprint(response.jsonSerialize())\r\n```\r\n\r\n#### Direct pay\r\n``` python\r\nfrom santimPay.types import SantimPayCheckoutRequest, SantimPayOptions\r\n\r\nrequest = SantimPayCheckoutRequest(\r\n    id,\r\n    amount,\r\n    paymentReason,\r\n    successRedirectUrl,\r\n    failureRedirectUrl,\r\n    notifyUrl,\r\n    cancelRedirectUrl,\r\n    direct = False\r\n)\r\n\r\n# options = SantimPayOptions()\r\n\r\n# replace phonne_number with actual phone number\r\nresponse = santim_pay.directpay.telebirr.create(\r\n    request,\r\n    phone_number\r\n)\r\n# or\r\nresponse = santim_pay.directpay.cbe.create(\r\n    request,\r\n    phone_number\r\n)\r\n\r\nprint(response.jsonSerialize())\r\n```\r\n## Contributing\r\n\r\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. After that free to contribute to this project. Please read the [CONTRIBUTING.md](https://github.com/nahom-d54/SantimPay/blob/main/CONTRIBUTING.md) file for more information.\r\n\r\n\r\n## Run Locally\r\n\r\nClone the project\r\n\r\n```bash\r\ngit clone https://github.com/nahom-d54/SantimPay.git\r\n```\r\n\r\nGo to the project directory\r\n\r\n```bash\r\ncd santimPay\r\n```\r\n\r\nInstall dependencies\r\n\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n## License\r\n\r\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "SantimPay Unofficial package",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/nahom-d54/SantimPay.git"
    },
    "split_keywords": [
        "santimpay",
        " python",
        " paymentgateway",
        " ethiopiapaymentgateway"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77a78bb94cdc6c6adf9079625fcc2bb5dc8b109d21d7901fe92ec5375bfe2739",
                "md5": "b49acbc92973bd571734cd68d5857ecf",
                "sha256": "381e365b160d777f7f63a9d5180d9a8f686d65cfd94574eb94635a03e6c36e9e"
            },
            "downloads": -1,
            "filename": "santimPay-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b49acbc92973bd571734cd68d5857ecf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8473,
            "upload_time": "2024-05-02T19:12:28",
            "upload_time_iso_8601": "2024-05-02T19:12:28.213655Z",
            "url": "https://files.pythonhosted.org/packages/77/a7/8bb94cdc6c6adf9079625fcc2bb5dc8b109d21d7901fe92ec5375bfe2739/santimPay-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-02 19:12:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nahom-d54",
    "github_project": "SantimPay",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "santimpay"
}
        
Elapsed time: 0.22199s