python-pay-ccavenue

Python package for integrating the CCAvenue payment gateway — secure encryption and decryption of payment data, typed throughout.

Stack
Python
Status
maintained
Source
https://github.com/kdpisda/python-pay-ccavenue

Published on PyPI as pay_ccavenue. A CCAvenue class handles the encryption handshake CCAvenue’s standard integration requires: outgoing form data (order id, amount, currency, redirect and cancel URLs) is AES-CBC encrypted into the encRequest payload, and the encResp coming back is decrypted the same way — pycryptodome is the only runtime dependency.

from pay_ccavenue import CCAvenue

ccavenue = CCAvenue()  # or pass working_key, access_code, ... directly

enc_request = ccavenue.encrypt({
    "order_id": "123456",
    "amount": "1000.00",
    "currency": "INR",
})
response = ccavenue.decrypt({"encResp": encrypted_response})

Credentials load from CCAVENUE_* environment variables or constructor arguments, form data is validated through a typed CCavenueFormData model, and — since 1.1.0 — process_webhook() parses CCAvenue’s server-to-server notifications into a typed CCavenueWebhookData (order status, tracking id, bank reference, risk flags). Releases publish to PyPI automatically from CI.

Standard integration only for now — iframe integration isn’t supported yet. MIT licensed, and not officially associated with CCAvenue.