Commerce CCAvenue
==================

INTRODUCTION
------------

Commerce CCAvenue provides Commerce integration for CCAvenue Payment Gateway.
This module allows you to accept payments through CCAvenue on your Drupal
Commerce store.

REQUIREMENTS
------------

This module requires the following:

* Drupal 10.1+ or Drupal 11+
* Commerce 2.35+
* OpenSSL PHP extension (replaces deprecated mcrypt)
* A CCAvenue merchant account with API credentials

INSTALLATION
------------

1. Install the module using Composer:
   composer require drupal/commerce_ccavenue

2. Enable the module:
   drush en commerce_ccavenue

3. Configure the payment gateway at:
   Administration > Commerce > Configuration > Payment gateways

CONFIGURATION
-------------

1. Create a new payment gateway:
   - Label: CCAvenue
   - Plugin: CCAvenue Redirect
   - Mode: Test or Live

2. Configure the gateway settings:
   - Merchant ID: Your CCAvenue merchant ID
   - Access Code: Your CCAvenue access code
   - Working Key: Your CCAvenue working key
   - Currency: Default currency (INR, USD, etc.)

3. Save the configuration

FEATURES
--------

* Secure payment processing through CCAvenue
* Support for multiple currencies (INR, USD, SGD, GBP, EUR)
* Test and live mode support
* Comprehensive error handling
* Order status management
* Drupal 11 compatible with modern dependency injection
* OpenSSL-based encryption (replaces deprecated mcrypt)

UPGRADE FROM DRUPAL 8/9
-----------------------

* The module now uses OpenSSL instead of mcrypt
* Updated to modern Drupal coding standards
* Enhanced dependency injection
* Improved error handling and testing

SECURITY
--------

* All payment data is encrypted using OpenSSL AES-128-CBC
* No sensitive payment information is stored locally
* Secure redirect to CCAvenue payment pages
* Return URL validation

TESTING
-------

The module includes comprehensive tests:

* Unit tests for encryption functionality
* Functional tests for payment gateway integration
* Configuration form testing

Run tests with:
vendor/bin/phpunit modules/custom/commerce_ccavenue/tests/
