credopay-gateway


Namecredopay-gateway JSON
Version 0.0.0b1 PyPI version JSON
download
home_pageNone
SummaryA Python library for the CredoPay payment gateway.
upload_time2024-06-12 10:37:25
maintainerNone
docs_urlNone
authorCredopay
requires_python>=3.6
licenseNone
keywords
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.gateway 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:
```

### 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. See the LICENSE file

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "credopay-gateway",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Credopay",
    "author_email": "support@credopay.com",
    "download_url": null,
    "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.gateway import CredoPayPaymentGateway\n\ngateway = CredoPayPaymentGateway('your-client-id', 'your-client-secret')\nCreating an Order\nTo create an order, use the create_order method of the OrderAPI class:\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. See the LICENSE file\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library for the CredoPay payment gateway.",
    "version": "0.0.0b1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3410984c96ac0540944cf0cb1fad16869bc05165892524b9383a77a343ad43fb",
                "md5": "171a50e9cad3f2ba952926495d648751",
                "sha256": "b599de31ee5f68141ae0ec1aa4d70dfcb7004ce9ca774660df3507ed0215772d"
            },
            "downloads": -1,
            "filename": "credopay_gateway-0.0.0b1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "171a50e9cad3f2ba952926495d648751",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6360,
            "upload_time": "2024-06-12T10:37:25",
            "upload_time_iso_8601": "2024-06-12T10:37:25.420259Z",
            "url": "https://files.pythonhosted.org/packages/34/10/984c96ac0540944cf0cb1fad16869bc05165892524b9383a77a343ad43fb/credopay_gateway-0.0.0b1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-12 10:37:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "credopay-gateway"
}
        
Elapsed time: 0.56062s