chargily-pay


Namechargily-pay JSON
Version 2.1.3 PyPI version JSON
download
home_pageNone
SummaryThis Plugin is to integrate ePayment gateway with Chargily V2 easily.
upload_time2024-04-01 17:26:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords chargily api payment
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to Python Package Repository
# for [Chargily Pay](https://chargily.com/business/pay "Chargily Pay")™ Gateway - V2.

Thank you for your interest in Python Package of Chargily Pay™, an open source project by Chargily, a leading fintech company in Algeria specializing in payment solutions and  e-commerce facilitating, this Package is providing the easiest and free way to integrate e-payment API through widespread payment methods in Algeria such as EDAHABIA (Algerie Post) and CIB (SATIM) into your Python/Django projects.

This package is developed by **Tarek Berkane ([tarek-berkane](https://github.com/tarek-berkane))** and is open to contributions from developers like you.

## Requirements
Chargily-Pay v2 requires `Python 3.8` and above.

## Installation
```bash
pip install chargily-pay
```

## Usage
```python
from chargily_pay import ChargilyClient
from chargily_pay.settings import CHARGILIY_TEST_URL


# ==============
# Init Chargily
# ==============
key = "YOUR_KEY"
secret = "YOUR_SECRET"

chargily = ChargilyClient(key, secret, CHARGILIY_TEST_URL)

# ==============
# Get Balance
# ==============
response = chargily.get_balance()

# ==============
# Create Customer
# ==============
from chargily_pay.entity import Customer, Address

customer = Customer(
    name="Username",
    email="example@gmail.com",
    address=Address(address="Address", state="State", country="dz"),
)
response = chargily.create_customer(customer)

# ==============
# Create Product
# ==============
from chargily_pay.entity import Product

product1 = Product(
    name="Product name",
)
chargily.create_product(product1)

# ==============
# Create Price
# ==============
from chargily_pay.entity import Product, Price

product = Product(
    name="Product name",
    description="Product description",
)
response = chargily.create_product(product)
product_id = response["id"]
price = chargily.create_price(Price(amount=100, currency="dzd", product_id=product_id))

# ==============
# Create Checkout
# =============================
# Create Checkout With Product
# =============================

from chargily_pay.entity import Product, Price
from chargily_pay.entity import Checkout

product = Product(
    name="Product name",
    description="Product description",
)
response = chargily.create_product(product)
product_id = response["id"]
price = chargily.create_price(Price(amount=100, currency="dzd", product_id=product_id))
price_id = price["id"]
checkout = chargily.create_checkout(
    Checkout(
        items=[{"price": price_id, "quantity": 1}],
        success_url="https://example.com/success",
        failure_url="https://example.com/failure",
    )
)

# =============================
# Create Checkout With Product
# =============================
from chargily_pay.entity import Checkout

response = chargily.create_checkout(
    Checkout(
        amount=1000,
        currency="dzd",
        success_url="https://example.com/success",
    )
)

# =============================
# Expire Checkout
# =============================
checkout_id = "checkout_id"
chargily.expire_checkout(checkout_id)


# ==============
# Create Payment
# ==============
from chargily_pay.entity import Product, Price, PaymentItem, PaymentLink

product = Product(
    name="Product name",
    description="Product description",
)
response = chargily.create_product(product)
product_id = response["id"]

price = Price(amount=100, currency="dzd", product_id=product_id)
response = chargily.create_price(price)
price_id = response["id"]

payment_link = chargily.create_payment_link(
    PaymentLink(
        name="Payment link name",
        items=[
            PaymentItem(
                price=price_id,
                quantity=1,
            )
        ],
    )
)


```

## Documentation For frameworks

-   [Django](https://github.com/Chargily/chargily-pay-python/blob/main/docs/examples/django.md)


## About Chargily Pay™ packages

Chargily Pay™ packages/plugins are a collection of open source projects published by Chargily to facilitate the integration of our payment gateway into different programming languages and frameworks. Our goal is to empower developers and businesses by providing easy-to-use tools to seamlessly accept payments.

## API Documentation

For detailed instructions on how to integrate with our API and utilize Chargily Pay™ in your projects, please refer to our [API Documentation](https://dev.chargily.com/pay-v2/introduction). 

## Developers Community

Join our developer community on Telegram to connect with fellow developers, ask questions, and stay updated on the latest news and developments related to Chargily Pay™ : [Telegram Community](https://chargi.link/PayTelegramCommunity)

## How to Contribute

We welcome contributions of all kinds, whether it's bug fixes, feature enhancements, documentation improvements, or new plugin/package developments. Here's how you can get started:

1. **Fork the Repository:** Click the "Fork" button in the top-right corner of this page to create your own copy of the repository.

2. **Clone the Repository:** Clone your forked repository to your local machine using the following command:

```bash
git clone https://github.com/Chargily/chargily-pay-python.git
```

3. **Make Changes:** Make your desired changes or additions to the codebase. Be sure to follow our coding standards and guidelines.

4. **Test Your Changes:** Test your changes thoroughly to ensure they work as expected.

5. **Submit a Pull Request:** Once you're satisfied with your changes, submit a pull request back to the main repository. Our team will review your contributions and provide feedback if needed.

## Get in Touch

Have questions or need assistance? Join our developer community on [Telegram](https://chargi.link/PayTelegramCommunity) and connect with fellow developers and our team.

We appreciate your interest in contributing to Chargily Pay™! Together, we can build something amazing.

Happy coding!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "chargily-pay",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "chargily, api, payment",
    "author": null,
    "author_email": "Berkane Tarek <tarekg320@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/27/19/6a61f8f607abf3fbca9902ab53f181678920cb73cd427a07da6c4994c6d2/chargily_pay-2.1.3.tar.gz",
    "platform": null,
    "description": "# Welcome to Python Package Repository\n# for [Chargily Pay](https://chargily.com/business/pay \"Chargily Pay\")\u2122 Gateway - V2.\n\nThank you for your interest in Python Package of Chargily Pay\u2122, an open source project by Chargily, a leading fintech company in Algeria specializing in payment solutions and  e-commerce facilitating, this Package is providing the easiest and free way to integrate e-payment API through widespread payment methods in Algeria such as EDAHABIA (Algerie Post) and CIB (SATIM) into your Python/Django projects.\n\nThis package is developed by **Tarek Berkane ([tarek-berkane](https://github.com/tarek-berkane))** and is open to contributions from developers like you.\n\n## Requirements\nChargily-Pay v2 requires `Python 3.8` and above.\n\n## Installation\n```bash\npip install chargily-pay\n```\n\n## Usage\n```python\nfrom chargily_pay import ChargilyClient\nfrom chargily_pay.settings import CHARGILIY_TEST_URL\n\n\n# ==============\n# Init Chargily\n# ==============\nkey = \"YOUR_KEY\"\nsecret = \"YOUR_SECRET\"\n\nchargily = ChargilyClient(key, secret, CHARGILIY_TEST_URL)\n\n# ==============\n# Get Balance\n# ==============\nresponse = chargily.get_balance()\n\n# ==============\n# Create Customer\n# ==============\nfrom chargily_pay.entity import Customer, Address\n\ncustomer = Customer(\n    name=\"Username\",\n    email=\"example@gmail.com\",\n    address=Address(address=\"Address\", state=\"State\", country=\"dz\"),\n)\nresponse = chargily.create_customer(customer)\n\n# ==============\n# Create Product\n# ==============\nfrom chargily_pay.entity import Product\n\nproduct1 = Product(\n    name=\"Product name\",\n)\nchargily.create_product(product1)\n\n# ==============\n# Create Price\n# ==============\nfrom chargily_pay.entity import Product, Price\n\nproduct = Product(\n    name=\"Product name\",\n    description=\"Product description\",\n)\nresponse = chargily.create_product(product)\nproduct_id = response[\"id\"]\nprice = chargily.create_price(Price(amount=100, currency=\"dzd\", product_id=product_id))\n\n# ==============\n# Create Checkout\n# =============================\n# Create Checkout With Product\n# =============================\n\nfrom chargily_pay.entity import Product, Price\nfrom chargily_pay.entity import Checkout\n\nproduct = Product(\n    name=\"Product name\",\n    description=\"Product description\",\n)\nresponse = chargily.create_product(product)\nproduct_id = response[\"id\"]\nprice = chargily.create_price(Price(amount=100, currency=\"dzd\", product_id=product_id))\nprice_id = price[\"id\"]\ncheckout = chargily.create_checkout(\n    Checkout(\n        items=[{\"price\": price_id, \"quantity\": 1}],\n        success_url=\"https://example.com/success\",\n        failure_url=\"https://example.com/failure\",\n    )\n)\n\n# =============================\n# Create Checkout With Product\n# =============================\nfrom chargily_pay.entity import Checkout\n\nresponse = chargily.create_checkout(\n    Checkout(\n        amount=1000,\n        currency=\"dzd\",\n        success_url=\"https://example.com/success\",\n    )\n)\n\n# =============================\n# Expire Checkout\n# =============================\ncheckout_id = \"checkout_id\"\nchargily.expire_checkout(checkout_id)\n\n\n# ==============\n# Create Payment\n# ==============\nfrom chargily_pay.entity import Product, Price, PaymentItem, PaymentLink\n\nproduct = Product(\n    name=\"Product name\",\n    description=\"Product description\",\n)\nresponse = chargily.create_product(product)\nproduct_id = response[\"id\"]\n\nprice = Price(amount=100, currency=\"dzd\", product_id=product_id)\nresponse = chargily.create_price(price)\nprice_id = response[\"id\"]\n\npayment_link = chargily.create_payment_link(\n    PaymentLink(\n        name=\"Payment link name\",\n        items=[\n            PaymentItem(\n                price=price_id,\n                quantity=1,\n            )\n        ],\n    )\n)\n\n\n```\n\n## Documentation For frameworks\n\n-   [Django](https://github.com/Chargily/chargily-pay-python/blob/main/docs/examples/django.md)\n\n\n## About Chargily Pay\u2122 packages\n\nChargily Pay\u2122 packages/plugins are a collection of open source projects published by Chargily to facilitate the integration of our payment gateway into different programming languages and frameworks. Our goal is to empower developers and businesses by providing easy-to-use tools to seamlessly accept payments.\n\n## API Documentation\n\nFor detailed instructions on how to integrate with our API and utilize Chargily Pay\u2122 in your projects, please refer to our [API Documentation](https://dev.chargily.com/pay-v2/introduction). \n\n## Developers Community\n\nJoin our developer community on Telegram to connect with fellow developers, ask questions, and stay updated on the latest news and developments related to Chargily Pay\u2122 : [Telegram Community](https://chargi.link/PayTelegramCommunity)\n\n## How to Contribute\n\nWe welcome contributions of all kinds, whether it's bug fixes, feature enhancements, documentation improvements, or new plugin/package developments. Here's how you can get started:\n\n1. **Fork the Repository:** Click the \"Fork\" button in the top-right corner of this page to create your own copy of the repository.\n\n2. **Clone the Repository:** Clone your forked repository to your local machine using the following command:\n\n```bash\ngit clone https://github.com/Chargily/chargily-pay-python.git\n```\n\n3. **Make Changes:** Make your desired changes or additions to the codebase. Be sure to follow our coding standards and guidelines.\n\n4. **Test Your Changes:** Test your changes thoroughly to ensure they work as expected.\n\n5. **Submit a Pull Request:** Once you're satisfied with your changes, submit a pull request back to the main repository. Our team will review your contributions and provide feedback if needed.\n\n## Get in Touch\n\nHave questions or need assistance? Join our developer community on [Telegram](https://chargi.link/PayTelegramCommunity) and connect with fellow developers and our team.\n\nWe appreciate your interest in contributing to Chargily Pay\u2122! Together, we can build something amazing.\n\nHappy coding!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This Plugin is to integrate ePayment gateway with Chargily V2 easily.",
    "version": "2.1.3",
    "project_urls": null,
    "split_keywords": [
        "chargily",
        " api",
        " payment"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "04ce60badbac7c342146189d355320ec1bff271d2e8b4df38d72630c1894d46e",
                "md5": "3cb50a6646efb2867d03b3cacbe66004",
                "sha256": "32ad5f4a0d77590b4e4e0cc90588b475c453fce3c918fbded54cfbd6f9ffe9c6"
            },
            "downloads": -1,
            "filename": "chargily_pay-2.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3cb50a6646efb2867d03b3cacbe66004",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6853,
            "upload_time": "2024-04-01T17:26:05",
            "upload_time_iso_8601": "2024-04-01T17:26:05.952482Z",
            "url": "https://files.pythonhosted.org/packages/04/ce/60badbac7c342146189d355320ec1bff271d2e8b4df38d72630c1894d46e/chargily_pay-2.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27196a61f8f607abf3fbca9902ab53f181678920cb73cd427a07da6c4994c6d2",
                "md5": "ea9870ff3af40d39bff949affb6575a9",
                "sha256": "093f73b7e06caa1c0b726f8e1ca1c5c44b618117f14bd7feceb1e098204ef2ed"
            },
            "downloads": -1,
            "filename": "chargily_pay-2.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ea9870ff3af40d39bff949affb6575a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17226,
            "upload_time": "2024-04-01T17:26:09",
            "upload_time_iso_8601": "2024-04-01T17:26:09.519246Z",
            "url": "https://files.pythonhosted.org/packages/27/19/6a61f8f607abf3fbca9902ab53f181678920cb73cd427a07da6c4994c6d2/chargily_pay-2.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-01 17:26:09",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "chargily-pay"
}
        
Elapsed time: 0.84993s