credopay-paymentgateway


Namecredopay-paymentgateway JSON
Version 0.1 PyPI version JSON
download
home_pageNone
SummaryA Python library for the CredoPay payment gateway.
upload_time2024-06-12 11:50:21
maintainerNone
docs_urlNone
authorCredopay
requires_python>=3.6
licenseNone
keywords credopay paymentgateway
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CredoPay Payment Gateway

CredoPay Payment Gateway is a Python library that provides an easy-to-use interface for interacting with the CredoPay payment gateway API. This library allows you to create orders, check order statuses, and manage transactions securely and efficiently.

## Features

- **Order Management**: Create and manage orders through CredoPay.
- **Transaction Management**: Handle transactions with ease.
- **Secure Authentication**: Uses secure basic authentication for API requests.
- **System Information**: Attaches system and server information to each request for better tracking and security.

## Installation

You can install the package via pip. Run the following command:

```bash
pip install credopay-paymentgateway
```

## Usage

### Initializing the Gateway

To start using the CredoPay Gateway, initialize the CredoPayPaymentGateway class with your client ID and client secret:

```bash
from credopay_paymentgateway import CredoPayPaymentGateway

gateway = CredoPayPaymentGateway('your-client-id', 'your-client-secret')
```

### Creating an Order

To create an order, use the create_order method of the OrderAPI class:

```bash
order_data = {
    'receiptId': '00000001',
    'amount': 100,
    'currency': 'INR',
    'description': 'Test Payment',
    'customerFields': {
        'name': 'Sample User',
        'email': 'xxx@yyy.xom',
        'phone': '1234567890'
    },
    'uiMode': 'checkout'
}

try:
    order_response = gateway.order.create_order(order_data)
    print("Order Response:", order_response)
except Exception as e:
    print('Error:', e)
```

### Checking Order Status

To check the status of an existing order, use the check_status method:

```bash
order_id = 'order-id'

try:
    status_response = gateway.order.check_status(order_id)
    print("Order Status:", status_response)
except Exception as e:
    print('Error:', e)
```

## License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "credopay-paymentgateway",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "credopay, paymentgateway",
    "author": "Credopay",
    "author_email": "support@credopay.com",
    "download_url": "https://files.pythonhosted.org/packages/7a/c1/bd0e4495dee8c4c870e19fb64bcdecd4748aa6d99db810282684874aefc2/credopay_paymentgateway-0.1.tar.gz",
    "platform": null,
    "description": "# CredoPay Payment Gateway\n\nCredoPay Payment Gateway is a Python library that provides an easy-to-use interface for interacting with the CredoPay payment gateway API. This library allows you to create orders, check order statuses, and manage transactions securely and efficiently.\n\n## Features\n\n- **Order Management**: Create and manage orders through CredoPay.\n- **Transaction Management**: Handle transactions with ease.\n- **Secure Authentication**: Uses secure basic authentication for API requests.\n- **System Information**: Attaches system and server information to each request for better tracking and security.\n\n## Installation\n\nYou can install the package via pip. Run the following command:\n\n```bash\npip install credopay-paymentgateway\n```\n\n## Usage\n\n### Initializing the Gateway\n\nTo start using the CredoPay Gateway, initialize the CredoPayPaymentGateway class with your client ID and client secret:\n\n```bash\nfrom credopay_paymentgateway import CredoPayPaymentGateway\n\ngateway = CredoPayPaymentGateway('your-client-id', 'your-client-secret')\n```\n\n### Creating an Order\n\nTo create an order, use the create_order method of the OrderAPI class:\n\n```bash\norder_data = {\n    'receiptId': '00000001',\n    'amount': 100,\n    'currency': 'INR',\n    'description': 'Test Payment',\n    'customerFields': {\n        'name': 'Sample User',\n        'email': 'xxx@yyy.xom',\n        'phone': '1234567890'\n    },\n    'uiMode': 'checkout'\n}\n\ntry:\n    order_response = gateway.order.create_order(order_data)\n    print(\"Order Response:\", order_response)\nexcept Exception as e:\n    print('Error:', e)\n```\n\n### Checking Order Status\n\nTo check the status of an existing order, use the check_status method:\n\n```bash\norder_id = 'order-id'\n\ntry:\n    status_response = gateway.order.check_status(order_id)\n    print(\"Order Status:\", status_response)\nexcept Exception as e:\n    print('Error:', e)\n```\n\n## License\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library for the CredoPay payment gateway.",
    "version": "0.1",
    "project_urls": null,
    "split_keywords": [
        "credopay",
        " paymentgateway"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9d0de847b6551ad60bbdc8c9f8a2d1033119cc0bd1492fd73df425c545fa2c8",
                "md5": "ec8cc569f8f62fa5468d5a2fb418a66e",
                "sha256": "5be303a709b61548000e4064e3829eaf042265ac2639570b4db9483ff219ac8f"
            },
            "downloads": -1,
            "filename": "credopay_paymentgateway-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ec8cc569f8f62fa5468d5a2fb418a66e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6738,
            "upload_time": "2024-06-12T11:50:19",
            "upload_time_iso_8601": "2024-06-12T11:50:19.625443Z",
            "url": "https://files.pythonhosted.org/packages/c9/d0/de847b6551ad60bbdc8c9f8a2d1033119cc0bd1492fd73df425c545fa2c8/credopay_paymentgateway-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ac1bd0e4495dee8c4c870e19fb64bcdecd4748aa6d99db810282684874aefc2",
                "md5": "cf042b47edfe375924d8b10ebdff2b66",
                "sha256": "1cf5a1c4108225e4d48a04e38563d146a2fdf936c18c03c8d04ba73c9d7072f0"
            },
            "downloads": -1,
            "filename": "credopay_paymentgateway-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "cf042b47edfe375924d8b10ebdff2b66",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4464,
            "upload_time": "2024-06-12T11:50:21",
            "upload_time_iso_8601": "2024-06-12T11:50:21.180359Z",
            "url": "https://files.pythonhosted.org/packages/7a/c1/bd0e4495dee8c4c870e19fb64bcdecd4748aa6d99db810282684874aefc2/credopay_paymentgateway-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-12 11:50:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "credopay-paymentgateway"
}
        
Elapsed time: 0.37415s