pay_ccavenue


Namepay_ccavenue JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/kdpisda/python-pay-ccavenue
SummaryA simple library to setup payment integration with CCAvenue
upload_time2024-09-25 22:13:05
maintainerNone
docs_urlNone
authorKuldeep Pisda
requires_python>=3.9
licenseMIT
keywords ccavenue payment python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pay_ccavenue

A Python package for seamless integration with CCAvenue payment gateway.

## Features

- Easy-to-use API for CCAvenue integration
- Secure encryption and decryption of payment data
- Flexible configuration via environment variables or direct instantiation
- Type hints for better code reliability

## Current Limitations

- This package does not yet support iframe integration with CCAvenue. It currently provides basic encryption and decryption functionality for standard integration.

## Installation

Install the package using pip:

```bash
pip install pay_ccavenue
```

## Quick Start

1. Import the CCAvenue class:

```python
from pay_ccavenue import CCAvenue
```

2. Initialize the CCAvenue object:

```python
# Using environment variables
ccavenue = CCAvenue()

# Or, passing credentials directly
ccavenue = CCAvenue(
    working_key="YOUR_WORKING_KEY",
    access_code="YOUR_ACCESS_CODE",
    merchant_code="YOUR_MERCHANT_CODE",
    redirect_url="YOUR_REDIRECT_URL",
    cancel_url="YOUR_CANCEL_URL"
)
```

3. Encrypt payment data:

```python
form_data = {
    "order_id": "123456",
    "amount": "1000.00",
    "currency": "INR",
    # Add other required fields
}

encrypted_data = ccavenue.encrypt(form_data)
```

4. Decrypt response data:

```python
response_data = {
    "encResp": "ENCRYPTED_RESPONSE_FROM_CCAVENUE"
}

decrypted_data = ccavenue.decrypt(response_data)
```

## Configuration

### Environment Variables

Set the following environment variables to configure the package:

- `CCAVENUE_WORKING_KEY`: Your CCAvenue working key
- `CCAVENUE_ACCESS_CODE`: Your CCAvenue access code
- `CCAVENUE_MERCHANT_CODE`: Your CCAvenue merchant code
- `CCAVENUE_REDIRECT_URL`: URL to redirect after successful payment
- `CCAVENUE_CANCEL_URL`: URL to redirect after cancelled payment

### Direct Instantiation

Pass the configuration parameters directly when creating the CCAvenue object:

```python
ccavenue = CCAvenue(
    working_key="YOUR_WORKING_KEY",
    access_code="YOUR_ACCESS_CODE",
    merchant_code="YOUR_MERCHANT_CODE",
    redirect_url="YOUR_REDIRECT_URL",
    cancel_url="YOUR_CANCEL_URL"
)
```

## API Reference

### `CCAvenue` Class

#### Methods

- `encrypt(data: Dict[str, Any]) -> str`: Encrypts the payment data
- `decrypt(data: Dict[str, str]) -> Dict[str, str]`: Decrypts the response data

### `CCavenueFormData` Class

Represents the form data required for CCAvenue payment processing. It includes mandatory and optional fields, and provides methods for data manipulation and validation.

#### Important Fields

- `merchant_id`: CCAvenue merchant ID
- `order_id`: Unique order identifier
- `currency`: Payment currency (default: "INR")
- `amount`: Payment amount
- `redirect_url`: URL for successful payment redirection
- `cancel_url`: URL for cancelled payment redirection

For a complete list of fields, refer to the `CCavenueFormData` class documentation.

## Security Considerations

- The package uses AES encryption with CBC mode for secure communication with CCAvenue.
- Ensure that your working key and other sensitive information are kept secure and not exposed in your codebase.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

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

## Disclaimer

This package is not officially associated with CCAvenue. Use it at your own risk and ensure compliance with CCAvenue's terms of service.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kdpisda/python-pay-ccavenue",
    "name": "pay_ccavenue",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "ccavenue, payment, python",
    "author": "Kuldeep Pisda",
    "author_email": "pisdak79@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4e/b9/b069ea11a0bfd08c33375adbe732631d03cafe1f3a21181d7de554c3a71e/pay_ccavenue-1.0.0.tar.gz",
    "platform": null,
    "description": "# pay_ccavenue\n\nA Python package for seamless integration with CCAvenue payment gateway.\n\n## Features\n\n- Easy-to-use API for CCAvenue integration\n- Secure encryption and decryption of payment data\n- Flexible configuration via environment variables or direct instantiation\n- Type hints for better code reliability\n\n## Current Limitations\n\n- This package does not yet support iframe integration with CCAvenue. It currently provides basic encryption and decryption functionality for standard integration.\n\n## Installation\n\nInstall the package using pip:\n\n```bash\npip install pay_ccavenue\n```\n\n## Quick Start\n\n1. Import the CCAvenue class:\n\n```python\nfrom pay_ccavenue import CCAvenue\n```\n\n2. Initialize the CCAvenue object:\n\n```python\n# Using environment variables\nccavenue = CCAvenue()\n\n# Or, passing credentials directly\nccavenue = CCAvenue(\n    working_key=\"YOUR_WORKING_KEY\",\n    access_code=\"YOUR_ACCESS_CODE\",\n    merchant_code=\"YOUR_MERCHANT_CODE\",\n    redirect_url=\"YOUR_REDIRECT_URL\",\n    cancel_url=\"YOUR_CANCEL_URL\"\n)\n```\n\n3. Encrypt payment data:\n\n```python\nform_data = {\n    \"order_id\": \"123456\",\n    \"amount\": \"1000.00\",\n    \"currency\": \"INR\",\n    # Add other required fields\n}\n\nencrypted_data = ccavenue.encrypt(form_data)\n```\n\n4. Decrypt response data:\n\n```python\nresponse_data = {\n    \"encResp\": \"ENCRYPTED_RESPONSE_FROM_CCAVENUE\"\n}\n\ndecrypted_data = ccavenue.decrypt(response_data)\n```\n\n## Configuration\n\n### Environment Variables\n\nSet the following environment variables to configure the package:\n\n- `CCAVENUE_WORKING_KEY`: Your CCAvenue working key\n- `CCAVENUE_ACCESS_CODE`: Your CCAvenue access code\n- `CCAVENUE_MERCHANT_CODE`: Your CCAvenue merchant code\n- `CCAVENUE_REDIRECT_URL`: URL to redirect after successful payment\n- `CCAVENUE_CANCEL_URL`: URL to redirect after cancelled payment\n\n### Direct Instantiation\n\nPass the configuration parameters directly when creating the CCAvenue object:\n\n```python\nccavenue = CCAvenue(\n    working_key=\"YOUR_WORKING_KEY\",\n    access_code=\"YOUR_ACCESS_CODE\",\n    merchant_code=\"YOUR_MERCHANT_CODE\",\n    redirect_url=\"YOUR_REDIRECT_URL\",\n    cancel_url=\"YOUR_CANCEL_URL\"\n)\n```\n\n## API Reference\n\n### `CCAvenue` Class\n\n#### Methods\n\n- `encrypt(data: Dict[str, Any]) -> str`: Encrypts the payment data\n- `decrypt(data: Dict[str, str]) -> Dict[str, str]`: Decrypts the response data\n\n### `CCavenueFormData` Class\n\nRepresents the form data required for CCAvenue payment processing. It includes mandatory and optional fields, and provides methods for data manipulation and validation.\n\n#### Important Fields\n\n- `merchant_id`: CCAvenue merchant ID\n- `order_id`: Unique order identifier\n- `currency`: Payment currency (default: \"INR\")\n- `amount`: Payment amount\n- `redirect_url`: URL for successful payment redirection\n- `cancel_url`: URL for cancelled payment redirection\n\nFor a complete list of fields, refer to the `CCavenueFormData` class documentation.\n\n## Security Considerations\n\n- The package uses AES encryption with CBC mode for secure communication with CCAvenue.\n- Ensure that your working key and other sensitive information are kept secure and not exposed in your codebase.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Disclaimer\n\nThis package is not officially associated with CCAvenue. Use it at your own risk and ensure compliance with CCAvenue's terms of service.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple library to setup payment integration with CCAvenue",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://github.com/kdpisda/python-pay-ccavenue",
        "Homepage": "https://github.com/kdpisda/python-pay-ccavenue",
        "Repository": "https://github.com/kdpisda/python-pay-ccavenue"
    },
    "split_keywords": [
        "ccavenue",
        " payment",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c81fcd0636f0845f3ab2dbc06cae1697b93dd4a8da2bf4e871a31ba34761a440",
                "md5": "df4d4ddd99b149aa87988c985ec784b4",
                "sha256": "ec8c08759df1ba70abdd2ed33691d9a6a6956c5a392f67625f3b50c5c4de0156"
            },
            "downloads": -1,
            "filename": "pay_ccavenue-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "df4d4ddd99b149aa87988c985ec784b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7449,
            "upload_time": "2024-09-25T22:13:03",
            "upload_time_iso_8601": "2024-09-25T22:13:03.892155Z",
            "url": "https://files.pythonhosted.org/packages/c8/1f/cd0636f0845f3ab2dbc06cae1697b93dd4a8da2bf4e871a31ba34761a440/pay_ccavenue-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4eb9b069ea11a0bfd08c33375adbe732631d03cafe1f3a21181d7de554c3a71e",
                "md5": "b56ea398b7709a9b7d7fbb5f61b2a8c1",
                "sha256": "51a663cd792a5c9786754b1e472445c2eb926f4e49ecb5d00b70998234e3c9c1"
            },
            "downloads": -1,
            "filename": "pay_ccavenue-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b56ea398b7709a9b7d7fbb5f61b2a8c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5759,
            "upload_time": "2024-09-25T22:13:05",
            "upload_time_iso_8601": "2024-09-25T22:13:05.299766Z",
            "url": "https://files.pythonhosted.org/packages/4e/b9/b069ea11a0bfd08c33375adbe732631d03cafe1f3a21181d7de554c3a71e/pay_ccavenue-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-25 22:13:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kdpisda",
    "github_project": "python-pay-ccavenue",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pay_ccavenue"
}
        
Elapsed time: 0.32566s