pypayment


Namepypayment JSON
Version 1.8.0 PyPI version JSON
download
home_pagehttps://github.com/TimNekk/pypayment
SummaryPayment Providers API Wrapper
upload_time2024-09-13 16:45:24
maintainerNone
docs_urlNone
authorTim
requires_python<4.0,>=3.8
licenseApache-2.0
keywords payment api wrapper payment-gateway payment-provider
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    <h1>
        <img src="assets/logo.png" alt="PyPayment" height="300">
        <br>
        <code>PyPayment</code>
    </h1>
    <div>
        <a href="https://pypi.org/project/pypayment/"><img
            alt="PyPI"
            src="https://img.shields.io/pypi/v/pypayment?color=orange&style=flat-square"
        ></a>
        <a href="https://www.python.org/"><img 
            alt="Python 3"
            src="https://img.shields.io/pypi/pyversions/pypayment?color=blueviolet&style=flat-square"
        ></a>
        <a href="https://github.com/TimNekk/PyPayment/blob/main/.github/workflows/lint.yml"><img
            alt="Lint"
            src="https://img.shields.io/github/actions/workflow/status/TimNekk/PyPayment/lint.yml?label=Lint&style=flat-square"
        ></a>
        <a href="https://github.com/astral-sh/ruff"><img
            alt="Ruff"
            src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat-square"
        ></a>
        <a href="https://gitmoji.dev"><img
            alt="Gitmoji"
            src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square"
        ></a>
    </div>
</div>


**PyPayment** is a wrapper for payment provider APIs

> Main idea – **unified interface** for every provider

This library simplifies payment integration

### Supported Providers

- [Qiwi P2P](https://p2p.qiwi.com/)
- [YooMoney](https://yoomoney.ru/)
- [PayOk](https://payok.io/)
- [BetaTransfer](https://betatransfer.io/)
- [Aaio](https://aaio.so/)
- [Lava](https://lava.kz/) *(under development)*

## 📦 Installation

Install the latest version with [PyPI](https://pypi.org/project/pypayment/)

```bash
pip install -U pypayment
```

## 🚀 Quickstart

```python
# Choose payment provider. For example, Qiwi
from pypayment import Payment, QiwiPayment, PaymentStatus

# Authorize payment provider
QiwiPayment.authorize("my_secret_key")

# Create a payment and get its url
payment: Payment = QiwiPayment(amount=100)
print(payment.url)  # https://oplata.qiwi.com/form/?invoice_uid=<payment_unique_id>

# Wait for payment to be completed
while payment.status != PaymentStatus.PAID:
    input("Press Enter to update payment status...")

    # Use `update()` method to update payment's `status` and `income`
    payment.update()

print("Payment is completed!")
print(payment.income)  # 90.0 (if commission is 10%)
```

> [!NOTE]
> For more details see [documentation](https://pypayment.readthedocs.io)

## 👥 Contributing

**Contributions are welcome! Here's how you can help:**

1. Fork it
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a new Pull Request
6. Get your code reviewed
7. Merge your code
8. Get a 🌟

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TimNekk/pypayment",
    "name": "pypayment",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "payment, api, wrapper, payment-gateway, payment-provider",
    "author": "Tim",
    "author_email": "herew26@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c8/bd/aebe62f7c413aff682ddc6cc1cea456801f6d5f9552d8f64357b95333546/pypayment-1.8.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n    <h1>\n        <img src=\"assets/logo.png\" alt=\"PyPayment\" height=\"300\">\n        <br>\n        <code>PyPayment</code>\n    </h1>\n    <div>\n        <a href=\"https://pypi.org/project/pypayment/\"><img\n            alt=\"PyPI\"\n            src=\"https://img.shields.io/pypi/v/pypayment?color=orange&style=flat-square\"\n        ></a>\n        <a href=\"https://www.python.org/\"><img \n            alt=\"Python 3\"\n            src=\"https://img.shields.io/pypi/pyversions/pypayment?color=blueviolet&style=flat-square\"\n        ></a>\n        <a href=\"https://github.com/TimNekk/PyPayment/blob/main/.github/workflows/lint.yml\"><img\n            alt=\"Lint\"\n            src=\"https://img.shields.io/github/actions/workflow/status/TimNekk/PyPayment/lint.yml?label=Lint&style=flat-square\"\n        ></a>\n        <a href=\"https://github.com/astral-sh/ruff\"><img\n            alt=\"Ruff\"\n            src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat-square\"\n        ></a>\n        <a href=\"https://gitmoji.dev\"><img\n            alt=\"Gitmoji\"\n            src=\"https://img.shields.io/badge/gitmoji-%20\ud83d\ude1c%20\ud83d\ude0d-FFDD67.svg?style=flat-square\"\n        ></a>\n    </div>\n</div>\n\n\n**PyPayment** is a wrapper for payment provider APIs\n\n> Main idea \u2013 **unified interface** for every provider\n\nThis library simplifies payment integration\n\n### Supported Providers\n\n- [Qiwi P2P](https://p2p.qiwi.com/)\n- [YooMoney](https://yoomoney.ru/)\n- [PayOk](https://payok.io/)\n- [BetaTransfer](https://betatransfer.io/)\n- [Aaio](https://aaio.so/)\n- [Lava](https://lava.kz/) *(under development)*\n\n## \ud83d\udce6 Installation\n\nInstall the latest version with [PyPI](https://pypi.org/project/pypayment/)\n\n```bash\npip install -U pypayment\n```\n\n## \ud83d\ude80 Quickstart\n\n```python\n# Choose payment provider. For example, Qiwi\nfrom pypayment import Payment, QiwiPayment, PaymentStatus\n\n# Authorize payment provider\nQiwiPayment.authorize(\"my_secret_key\")\n\n# Create a payment and get its url\npayment: Payment = QiwiPayment(amount=100)\nprint(payment.url)  # https://oplata.qiwi.com/form/?invoice_uid=<payment_unique_id>\n\n# Wait for payment to be completed\nwhile payment.status != PaymentStatus.PAID:\n    input(\"Press Enter to update payment status...\")\n\n    # Use `update()` method to update payment's `status` and `income`\n    payment.update()\n\nprint(\"Payment is completed!\")\nprint(payment.income)  # 90.0 (if commission is 10%)\n```\n\n> [!NOTE]\n> For more details see [documentation](https://pypayment.readthedocs.io)\n\n## \ud83d\udc65 Contributing\n\n**Contributions are welcome! Here's how you can help:**\n\n1. Fork it\n2. Create your feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a new Pull Request\n6. Get your code reviewed\n7. Merge your code\n8. Get a \ud83c\udf1f\n\n## \ud83d\udcdd License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Payment Providers API Wrapper",
    "version": "1.8.0",
    "project_urls": {
        "Documentation": "https://pypayment.readthedocs.io/",
        "Homepage": "https://github.com/TimNekk/pypayment",
        "Repository": "https://github.com/TimNekk/pypayment.git"
    },
    "split_keywords": [
        "payment",
        " api",
        " wrapper",
        " payment-gateway",
        " payment-provider"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c125f540089b5c3b1331c1e3cf934b3674e3c16af8d8cdd30e3d549f215412de",
                "md5": "f47eee466bf68c72b210817c935c407d",
                "sha256": "548fd2ce33617e17354ca135115a6fd07c96bc35f8308557fbb116bfa48dfc13"
            },
            "downloads": -1,
            "filename": "pypayment-1.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f47eee466bf68c72b210817c935c407d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 24054,
            "upload_time": "2024-09-13T16:45:23",
            "upload_time_iso_8601": "2024-09-13T16:45:23.283987Z",
            "url": "https://files.pythonhosted.org/packages/c1/25/f540089b5c3b1331c1e3cf934b3674e3c16af8d8cdd30e3d549f215412de/pypayment-1.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c8bdaebe62f7c413aff682ddc6cc1cea456801f6d5f9552d8f64357b95333546",
                "md5": "3d58591bc71952be2a1196b9961d26a3",
                "sha256": "755f3192c6aa3003b984e480dbf9d03c3aefec5565c68598966489dd3afb0dd7"
            },
            "downloads": -1,
            "filename": "pypayment-1.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3d58591bc71952be2a1196b9961d26a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 17318,
            "upload_time": "2024-09-13T16:45:24",
            "upload_time_iso_8601": "2024-09-13T16:45:24.724237Z",
            "url": "https://files.pythonhosted.org/packages/c8/bd/aebe62f7c413aff682ddc6cc1cea456801f6d5f9552d8f64357b95333546/pypayment-1.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-13 16:45:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TimNekk",
    "github_project": "pypayment",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pypayment"
}
        
Tim
Elapsed time: 1.56762s