qpay-python


Nameqpay-python JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/khasbilegt/qpay-python
SummaryQPay v2 SDK client for Python projects
upload_time2024-10-12 05:42:01
maintainerNone
docs_urlNone
authorkhasbilegt
requires_python<4.0,>=3.9
licenseMIT
keywords python qpay sdk payment qr finance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
  QPay Python
</h1>

<p align="center">
  <a href="https://github.com/khasbilegt/qpay-python/">
    <img src="https://img.shields.io/github/actions/workflow/status/khasbilegt/qpay-python/qa.yml?label=CI&logo=github&style=for-the-badge" alt="ci status">
  </a>
  <a href="https://codecov.io/github/khasbilegt/qpay-python">
    <img src="https://img.shields.io/codecov/c/github/khasbilegt/qpay-python?logo=codecov&style=for-the-badge" alt="codecov">
  </a>
  <br>
  <a href="https://pypi.org/project/qpay-python/">
    <img src="https://img.shields.io/pypi/v/qpay-python?style=for-the-badge" alt="pypi link">
  </a>
  <a>
    <img src="https://img.shields.io/pypi/pyversions/qpay-python?logo=python&style=for-the-badge" alt="supported python versions">
  </a>
</p>

<p align="center">
  <a href="#usage">Ашиглах</a> •
  <a href="#contribution">Хөгжүүлэлтэнд оролцох</a> •
  <a href="#license">Лиценз</a>
</p>

<p align="center">QPay v2 гүйлгээний сервисүүдийг Python хэлний орчинд ашиглахад зориулсан сан</p>

### <a id="usage"></a>QPayClient -г ашиглах

Хамгийн эхлээд `QPayClient` -с объект үүсгэж авна. Ингэхийн тулд KKTТ ХХК -тай гэрээ хийн нэр, нууц үг авсан байх шаардлагатай. Нэг л удаа үүсгээд авчихсан байхад токен дуусах, сунгах зэрэг дээр санаа зовох шаардлагагүй.

```py
import qpay import QPayClient

client = QPayClient(host="https://merchant.qpay.mn/v2/", username="MERCHANT_USERNAME", password="MERCHANT_PASSWORD")

...
```

QPayClient нь singleton paradigm -г ашигладаг учир нэг л объект үүсгэж, тэрийгээ дахин ашиглана. Шаардлагатай сервисүүдийг үүсгэсэн объектоороо дамжуулан дуудна.

```py
...

payload = {"invoice_code": ... }
invoice = client.invoice_create(json=payload)
print(invoice.qr_text) # 0002010102121531279404962794049600000000KKTQ...

...
```

## <a id="contribution"></a>Хөгжүүлэлтэнд оролцох

Энэхүү сантай холбоотой алдаа засвар, сайжруулалт болон бусад санал, хүсэлтийг нээлттэй хүлээж авах ба ялангуяа чанартай кодын өөрчлөлтүүд илгээвэл маш их баярлах болно.

Жич: Кодын өөрчлөлт оруулахдаа заавал тестийг нь хамт оруулахаа битгий мартаарай.

## <a id="license"></a>Лиценз

[MIT License](https://choosealicense.com/licenses/mit/)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/khasbilegt/qpay-python",
    "name": "qpay-python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "python, qpay, sdk, payment, qr, finance",
    "author": "khasbilegt",
    "author_email": "khasbilegt.ts@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/00/d9/064cf46fe28791a6ff62d111280e027194820356b19e4f389d43f23d985d/qpay_python-0.0.4.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n  QPay Python\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://github.com/khasbilegt/qpay-python/\">\n    <img src=\"https://img.shields.io/github/actions/workflow/status/khasbilegt/qpay-python/qa.yml?label=CI&logo=github&style=for-the-badge\" alt=\"ci status\">\n  </a>\n  <a href=\"https://codecov.io/github/khasbilegt/qpay-python\">\n    <img src=\"https://img.shields.io/codecov/c/github/khasbilegt/qpay-python?logo=codecov&style=for-the-badge\" alt=\"codecov\">\n  </a>\n  <br>\n  <a href=\"https://pypi.org/project/qpay-python/\">\n    <img src=\"https://img.shields.io/pypi/v/qpay-python?style=for-the-badge\" alt=\"pypi link\">\n  </a>\n  <a>\n    <img src=\"https://img.shields.io/pypi/pyversions/qpay-python?logo=python&style=for-the-badge\" alt=\"supported python versions\">\n  </a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#usage\">\u0410\u0448\u0438\u0433\u043b\u0430\u0445</a> \u2022\n  <a href=\"#contribution\">\u0425\u04e9\u0433\u0436\u04af\u04af\u043b\u044d\u043b\u0442\u044d\u043d\u0434 \u043e\u0440\u043e\u043b\u0446\u043e\u0445</a> \u2022\n  <a href=\"#license\">\u041b\u0438\u0446\u0435\u043d\u0437</a>\n</p>\n\n<p align=\"center\">QPay v2 \u0433\u04af\u0439\u043b\u0433\u044d\u044d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u04af\u04af\u0434\u0438\u0439\u0433 Python \u0445\u044d\u043b\u043d\u0438\u0439 \u043e\u0440\u0447\u0438\u043d\u0434 \u0430\u0448\u0438\u0433\u043b\u0430\u0445\u0430\u0434 \u0437\u043e\u0440\u0438\u0443\u043b\u0441\u0430\u043d \u0441\u0430\u043d</p>\n\n### <a id=\"usage\"></a>QPayClient -\u0433 \u0430\u0448\u0438\u0433\u043b\u0430\u0445\n\n\u0425\u0430\u043c\u0433\u0438\u0439\u043d \u044d\u0445\u043b\u044d\u044d\u0434 `QPayClient` -\u0441 \u043e\u0431\u044a\u0435\u043a\u0442 \u04af\u04af\u0441\u0433\u044d\u0436 \u0430\u0432\u043d\u0430. \u0418\u043d\u0433\u044d\u0445\u0438\u0439\u043d \u0442\u0443\u043b\u0434 KKT\u0422 \u0425\u0425\u041a -\u0442\u0430\u0439 \u0433\u044d\u0440\u044d\u044d \u0445\u0438\u0439\u043d \u043d\u044d\u0440, \u043d\u0443\u0443\u0446 \u04af\u0433 \u0430\u0432\u0441\u0430\u043d \u0431\u0430\u0439\u0445 \u0448\u0430\u0430\u0440\u0434\u043b\u0430\u0433\u0430\u0442\u0430\u0439. \u041d\u044d\u0433 \u043b \u0443\u0434\u0430\u0430 \u04af\u04af\u0441\u0433\u044d\u044d\u0434 \u0430\u0432\u0447\u0438\u0445\u0441\u0430\u043d \u0431\u0430\u0439\u0445\u0430\u0434 \u0442\u043e\u043a\u0435\u043d \u0434\u0443\u0443\u0441\u0430\u0445, \u0441\u0443\u043d\u0433\u0430\u0445 \u0437\u044d\u0440\u044d\u0433 \u0434\u044d\u044d\u0440 \u0441\u0430\u043d\u0430\u0430 \u0437\u043e\u0432\u043e\u0445 \u0448\u0430\u0430\u0440\u0434\u043b\u0430\u0433\u0430\u0433\u04af\u0439.\n\n```py\nimport qpay import QPayClient\n\nclient = QPayClient(host=\"https://merchant.qpay.mn/v2/\", username=\"MERCHANT_USERNAME\", password=\"MERCHANT_PASSWORD\")\n\n...\n```\n\nQPayClient \u043d\u044c singleton paradigm -\u0433 \u0430\u0448\u0438\u0433\u043b\u0430\u0434\u0430\u0433 \u0443\u0447\u0438\u0440 \u043d\u044d\u0433 \u043b \u043e\u0431\u044a\u0435\u043a\u0442 \u04af\u04af\u0441\u0433\u044d\u0436, \u0442\u044d\u0440\u0438\u0439\u0433\u044d\u044d \u0434\u0430\u0445\u0438\u043d \u0430\u0448\u0438\u0433\u043b\u0430\u043d\u0430. \u0428\u0430\u0430\u0440\u0434\u043b\u0430\u0433\u0430\u0442\u0430\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u04af\u04af\u0434\u0438\u0439\u0433 \u04af\u04af\u0441\u0433\u044d\u0441\u044d\u043d \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043e\u0440\u043e\u043e \u0434\u0430\u043c\u0436\u0443\u0443\u043b\u0430\u043d \u0434\u0443\u0443\u0434\u043d\u0430.\n\n```py\n...\n\npayload = {\"invoice_code\": ... }\ninvoice = client.invoice_create(json=payload)\nprint(invoice.qr_text) # 0002010102121531279404962794049600000000KKTQ...\n\n...\n```\n\n## <a id=\"contribution\"></a>\u0425\u04e9\u0433\u0436\u04af\u04af\u043b\u044d\u043b\u0442\u044d\u043d\u0434 \u043e\u0440\u043e\u043b\u0446\u043e\u0445\n\n\u042d\u043d\u044d\u0445\u04af\u04af \u0441\u0430\u043d\u0442\u0430\u0439 \u0445\u043e\u043b\u0431\u043e\u043e\u0442\u043e\u0439 \u0430\u043b\u0434\u0430\u0430 \u0437\u0430\u0441\u0432\u0430\u0440, \u0441\u0430\u0439\u0436\u0440\u0443\u0443\u043b\u0430\u043b\u0442 \u0431\u043e\u043b\u043e\u043d \u0431\u0443\u0441\u0430\u0434 \u0441\u0430\u043d\u0430\u043b, \u0445\u04af\u0441\u044d\u043b\u0442\u0438\u0439\u0433 \u043d\u044d\u044d\u043b\u0442\u0442\u044d\u0439 \u0445\u04af\u043b\u044d\u044d\u0436 \u0430\u0432\u0430\u0445 \u0431\u0430 \u044f\u043b\u0430\u043d\u0433\u0443\u044f\u0430 \u0447\u0430\u043d\u0430\u0440\u0442\u0430\u0439 \u043a\u043e\u0434\u044b\u043d \u04e9\u04e9\u0440\u0447\u043b\u04e9\u043b\u0442\u04af\u04af\u0434 \u0438\u043b\u0433\u044d\u044d\u0432\u044d\u043b \u043c\u0430\u0448 \u0438\u0445 \u0431\u0430\u044f\u0440\u043b\u0430\u0445 \u0431\u043e\u043b\u043d\u043e.\n\n\u0416\u0438\u0447: \u041a\u043e\u0434\u044b\u043d \u04e9\u04e9\u0440\u0447\u043b\u04e9\u043b\u0442 \u043e\u0440\u0443\u0443\u043b\u0430\u0445\u0434\u0430\u0430 \u0437\u0430\u0430\u0432\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0439\u0433 \u043d\u044c \u0445\u0430\u043c\u0442 \u043e\u0440\u0443\u0443\u043b\u0430\u0445\u0430\u0430 \u0431\u0438\u0442\u0433\u0438\u0439 \u043c\u0430\u0440\u0442\u0430\u0430\u0440\u0430\u0439.\n\n## <a id=\"license\"></a>\u041b\u0438\u0446\u0435\u043d\u0437\n\n[MIT License](https://choosealicense.com/licenses/mit/)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "QPay v2 SDK client for Python projects",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "https://github.com/khasbilegt/qpay-python",
        "Repository": "https://github.com/khasbilegt/qpay-python"
    },
    "split_keywords": [
        "python",
        " qpay",
        " sdk",
        " payment",
        " qr",
        " finance"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "afe23e6f861eb552e596df3d4a4df778dfb3383e70699b3e57f3ed5b6abf3539",
                "md5": "1a4aa88f5df0cc7535f112569b4b2409",
                "sha256": "30c964aeb4ce207c67dd47228681ad42a238409e445f756801d7ae7118fdbf90"
            },
            "downloads": -1,
            "filename": "qpay_python-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a4aa88f5df0cc7535f112569b4b2409",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 6100,
            "upload_time": "2024-10-12T05:42:00",
            "upload_time_iso_8601": "2024-10-12T05:42:00.748998Z",
            "url": "https://files.pythonhosted.org/packages/af/e2/3e6f861eb552e596df3d4a4df778dfb3383e70699b3e57f3ed5b6abf3539/qpay_python-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00d9064cf46fe28791a6ff62d111280e027194820356b19e4f389d43f23d985d",
                "md5": "547ac6d257e7ff95befb88f754090e20",
                "sha256": "fda42ab89c0e237f953f8ae878e103c3258168445f4b0e90781149e469884e3b"
            },
            "downloads": -1,
            "filename": "qpay_python-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "547ac6d257e7ff95befb88f754090e20",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 5175,
            "upload_time": "2024-10-12T05:42:01",
            "upload_time_iso_8601": "2024-10-12T05:42:01.860692Z",
            "url": "https://files.pythonhosted.org/packages/00/d9/064cf46fe28791a6ff62d111280e027194820356b19e4f389d43f23d985d/qpay_python-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-12 05:42:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "khasbilegt",
    "github_project": "qpay-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "qpay-python"
}
        
Elapsed time: 0.32562s