Back

VibeFox CCAvenue for OpenCart — Help

Requirements

OpenCart: 3.0.x (tested on 3.0.5.0) or 4.0.2 and later (tested on 4.1.0.3).

PHP: 8.0 or later, with the OpenSSL extension (used to encrypt the request and decrypt the response).

CCAvenue account: you need a CCAvenue merchant account with a Merchant ID, an Access Code and a Working Key. The Access Code and Working Key are issued for a website domain, so generate them for the domain of this store. CCAvenue uses the same credentials for the test environment; test access must be enabled for your account by CCAvenue. The extension uses the CCAvenue India endpoints.

Currency: the order currency is sent to CCAvenue as is. CCAvenue accounts accept INR by default; other currencies require multi-currency processing on your CCAvenue account.

VibeFox license key: bought on vibefox.net. One key works on one domain.

Installation

The download is one zip file with the packages for both OpenCart versions. Unpack it on your computer. It contains README.txt, the OpenCart 3 package wcp_ccavenue_payment-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_ccavenue_payment.ocmod.zip. Install only the package for your OpenCart version. The license key is the same for both versions.

OpenCart 3

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_ccavenue_payment-oc3-(version).ocmod.zip. The extension has no OCMOD modifications, so Extensions > Modifications does not need a refresh. Instead of the installer you can copy the contents of the upload folder of this package into the root folder of your store.

2. Go to Extensions > Extensions and choose the type Payments. Find VibeFox CCAvenue Payment and click Install (the green + button). Your admin user needs the right to modify the payment extensions list.

3. Click Edit (the pencil button) to open the settings page. Paste your VibeFox license key into License key in the license block at the top of the page and click Activate (see License key).

4. Enter the Merchant ID, Access Code and Working Key from your CCAvenue dashboard, turn on Enable/Disable and click Save.

5. Keep Test mode on while testing, then switch it off to accept real payments. Nothing has to be set up in the CCAvenue dashboard: the return address is sent with every payment.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_ccavenue_payment.ocmod.zip. Do not rename the file: OpenCart 4 takes the extension code from the file name, and a renamed package does not work.

2. The package appears in the list of installed extensions on the same page. Click Install (the green + button) next to it.

3. Go to Extensions > Extensions and choose the type Payments. Find VibeFox CCAvenue Payment, click Install (the green + button), then Edit (the pencil button).

4. Enter the license key and the CCAvenue credentials as in steps 3 to 5 for OpenCart 3. The settings page and its fields are the same in both versions. Only the return URL is different (see Return URL).

A new install starts with the payment method turned off and test mode on.

Configuration

All settings are on the extension page: Extensions > Extensions > Payments > VibeFox CCAvenue Payment > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings the page warns you when CCAvenue is enabled but the Merchant ID, Access Code or Working Key is missing (the payment method is then hidden at checkout until all three are set), shows CCAvenue test mode is on: customers are sent to test.ccavenue.com and no real money is taken. while the payment method is enabled in test mode, and reminds you about multi-currency processing when the default currency of the store is not INR. Without the right to modify the extension the page shows the settings but cannot save them.

When you save, Title must not be empty (at most 128 characters), Sort Order must be a whole number, Total a number of 0 or more, and the geo zone and order statuses must exist; otherwise nothing is saved.

CCAvenue

Enable/Disable: Enable CCAvenue Payment Gateway turns the payment method on or off. Default: off.

Title: the payment method name customers see at checkout. It is also the payment method name stored in the order. Default: CCAvenue. Required.

Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely via Credit/Debit card, Net Banking, UPI or Wallet through CCAvenue.

Sort Order: the position of CCAvenue among the payment methods at checkout. Leave it empty or enter a whole number.

Geo Zone: offer CCAvenue only for payment addresses in the selected geo zone. Default: All zones. Geo zones are set up in System > Localisation > Geo Zones.

Total: the checkout total, in the default currency of the store, that an order must reach before CCAvenue is offered. Leave it empty to offer CCAvenue for any total.

API credentials

Log in to your CCAvenue merchant dashboard (M.A.R.S.) and open Settings > API Keys. Generate the Access Code and Working Key for the domain of this store. Spaces in the credentials are removed on save.

Merchant ID: your numeric CCAvenue Merchant ID. If it contains anything other than digits, the message CCAvenue: the Merchant ID must contain digits only — the previous value was kept. is shown on save, the previously saved value stays and the other settings are saved.

Access Code: the Access Code for this website (Settings > API Keys).

Working Key: the Working Key (encryption key) for this website. It encrypts the payment request and is the only way to verify the CCAvenue response, so keep it secret. A saved Working Key is never shown again. The field stays empty and shows Saved — leave empty to keep it. Type a new value only to change it. To remove it, tick Clear saved Working Key under the field and click Save.

Test mode: sends customers to the CCAvenue test environment (test.ccavenue.com). CCAvenue uses the same Merchant ID, Access Code and Working Key for test and live; test access must be enabled for your account by CCAvenue. In test mode the Confirm Order step shows TEST MODE: no real transactions will be processed. Default: on. Disable it for real payments.

Return URL

CCAvenue returns the customer to the address shown in this section. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_ccavenue_payment/back, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_ccavenue_payment/payment/wcp_ccavenue_payment.back. It is built from the storefront address of your OpenCart installation. The extension sends this URL with every payment (as the redirect and cancel URL), so there is nothing to configure in CCAvenue. It must belong to the domain registered with CCAvenue.

Orders

OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after the encrypted CCAvenue response has been verified. A failed or cancelled payment leaves the order without a status, and the customer goes back to the checkout with the cart kept. Each field below lists your OpenCart order statuses.

Order Status After Payment: a successful payment (CCAvenue status Success, amount and currency verified). Default: Processing.

Awaiting Payment Status: Awaited: the bank has not confirmed the payment yet. The order gets Order Status After Payment when CCAvenue reports Success for the same tracking ID. Default: Pending.

On Hold (Review) Status: CCAvenue reported a different amount or currency than the order total, or a payment arrived for a cancelled order. A note explains it. Default: Pending, because OpenCart has no On hold status. You can create your own status in System > Localisation > Order Statuses and select it here.

Cancelled Payment Status: an awaited payment was then aborted (Aborted for the same tracking ID). Default: Canceled.

Failed Payment Status: an awaited payment then failed (Failure, Invalid or Timeout for the same tracking ID). A failure of an older attempt does not change the order. Default: Failed.

Advanced

Debug log: writes CCAvenue events to ccavenue_p_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web. Only order references, tracking IDs and statuses are logged; keys, card data, e-mails and addresses are not. Default: off. Nothing is written while it is off, errors included.

Log: shows the size and the latest entries of the log. Click Clear log to empty it.

Delete data on uninstall: when on, uninstalling the extension removes the extension settings and the log. Orders and the CCAvenue payment references stay, so a late return of an old payment is still handled after a re-install. Default: off.

Import / Export

Export: Download JSON saves the settings as a JSON file. The Working Key is not exported.

Import: paste previously exported JSON and click Import to restore the settings. The saved Working Key is kept.

Checkout

At the Payment Method step the customer chooses the payment method (by default CCAvenue). At the Confirm Order step the customer sees your description. OpenCart creates the order at this step, still without a status. When the customer clicks Confirm Order, the step shows Thank you for your order. You are being redirected to CCAvenue to complete the payment. and sends the customer to the CCAvenue payment page. A Pay via CCAvenue button is shown while the browser goes there. On OpenCart 4 the customer picks the payment method with the Choose button of the payment method block, in the window Payment method options, and clicks Confirm Order at the bottom of the checkout page.

Each attempt gets a new CCAvenue order reference made of the OpenCart order number and the time. The order total and currency, the billing details, the delivery address (when the order is shipped and the delivery address differs from the billing address) and a secret token of the attempt are sent in the encrypted request. Names and addresses are cleaned to the characters and lengths CCAvenue accepts; country and state are sent as names and the phone as digits. The customer chooses the card, Net Banking, UPI, wallet or EMI on the CCAvenue page. OpenCart 4 does not ask for a payment address by default; the billing details are then taken from the delivery address.

After the payment, CCAvenue returns the customer with an encrypted response. The order is marked paid only after CCAvenue confirms it: the response must decrypt with your Working Key, belong to an attempt of this store and carry the same amount and currency as were sent and as the order total. The order then gets its status the standard OpenCart way, with the usual order e-mails and stock update, and the customer sees the OpenCart order success page with Your CCAvenue payment has been received. For an Awaited payment the page shows Your CCAvenue payment is awaiting confirmation from your bank. The order will be processed as soon as the payment is confirmed. After an amount or currency mismatch it shows Your payment was received and is being reviewed by the store. On OpenCart 4 the browser does not send the store session when CCAvenue sends the customer back, so after applying the response the extension shows a short page that opens the return address again from your store: the customer keeps the cart and the login.

If the payment fails, the customer is back at checkout with Payment was not completed. Please try again or choose a different payment method. If the customer cancels on the CCAvenue page, the message is Payment was cancelled. You may try again. If the response cannot be verified, the message is We could not confirm the payment result. If your account was charged, please contact us before paying again. On OpenCart 4 these messages are shown above the checkout page. In these cases the order stays without a status and the cart is kept, so the customer can pay again. OpenCart 3 creates a new order every time the Confirm Order step is shown; OpenCart 4 keeps one order for the checkout and updates it. Each attempt gets its own CCAvenue order reference. CCAvenue cannot cancel a started payment, so a late successful payment of an older attempt is still applied to its own order. One cart is paid once: a cart that is already paid by another order is not sent to CCAvenue again (the customer goes to the success page), and if the same cart is still paid twice (for example in two browser tabs), the second order keeps no status and the paid order gets a note that the customer may have been charged twice, so you can refund it in the CCAvenue dashboard.

OpenCart 4 keeps the order in the checkout until the success page is shown. If that order was closed meanwhile, Confirm Order sends the customer back to the checkout, and the next Confirm Order pays a new order of the cart. The message is Payment was cancelled. You may try again. when an awaited payment was aborted, Payment was not completed. Please try again or choose a different payment method. when it failed, and This order can no longer be paid (it was closed by the store). Please confirm your order again. when you closed an order that had a payment. If the order already has a status and the cart has changed since (other products or quantities), the message is Your previous order is already paid. Please confirm the order again: the cart will be paid with a new order.

The result is taken only from the customer's return from CCAvenue: there are no server-to-server notifications and no status requests. If the customer closes the browser before returning, the order stays without a status; check the payment in the CCAvenue dashboard. The extension has no refunds from OpenCart, no saved cards, subscriptions or recurring payments, no on-site card form, and no support for CCAvenue UAE or other regional platforms.

Orders

Order statuses

No status (missing order): the customer was sent to CCAvenue and has not returned, or the payment failed or was cancelled. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders. Check the payment in the CCAvenue dashboard if the customer does not come back.

Order Status After Payment (default Processing): the payment was confirmed. A note shows the bank reference, the tracking ID and the payment mode.

Awaiting Payment Status (default Pending): CCAvenue reported the payment as Awaited (the bank has not confirmed it yet). The order is never marked failed while the money may still be captured, and a note asks you to verify it in the CCAvenue dashboard before fulfilling. A later response with the same tracking ID is still applied: Success sets Order Status After Payment, Failure sets Failed Payment Status, Aborted sets Cancelled Payment Status. OpenCart notifies the customer of these changes.

On Hold (Review) Status (default Pending): CCAvenue confirmed a payment whose amount or currency differs from the order total or from what was sent, or the customer paid after the order had been cancelled or had failed. The note shows the received and expected amount. Check the payment in the CCAvenue dashboard, then fulfil the order or refund the payment.

A late failure never changes a paid order, and an order you completed by hand is not changed. If another successful payment arrives for an order that is already paid (for example from two browser tabs), the order is not changed. A note asks you to refund the duplicate in the CCAvenue dashboard.

Notes are entries in the order History that the customer does not see.

VibeFox CCAvenue Payment tab

In Sales > Orders open an order paid with CCAvenue. At the bottom of the order page, next to History and Additional, the VibeFox CCAvenue Payment tab shows the CCAvenue order ID with a Test mode label for test payments, the Tracking ID, the Status, the Bank reference, the Payment mode and card name, the Amount sent and the Amount received, the Date, the CCAvenue Message and the CCAvenue notes of the order. The tab is shown to users who have access to the extension.

Refunds

Refunds from OpenCart are not supported. Refund the payment in the CCAvenue dashboard, then record the refund in OpenCart manually, for example by changing the order status.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox CCAvenue Payment is the first block on Extensions > Extensions > Payments > VibeFox CCAvenue Payment > Edit, above the settings. Paste the key into License key and click Activate. After that the block shows the key masked, the status (for example the date the license is active until and your domain) and the buttons Check now to check the status again, Change key to enter another key and Remove key to remove the key from this store. Below them are the line Product: opencart-payment-ccavenue and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only admin users with the Modify permission for the extension can change the key. The texts of the block follow the admin language (English and Russian are included).

If the key is not accepted, the block says why, for example Key not found, This key belongs to another product, Domain limit reached or License expired on a date. After the store address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the extension keeps working on the last known status.

One key works on one domain: the store address from the OpenCart configuration. Removing the key from the store does not free its domain slot. Free the slot in your vibefox.net account.

Without an active key, CCAvenue is not shown to customers at checkout. If a payment is started anyway, the customer sees This payment method is not available. Please choose another one. An admin user who is logged in to the admin in the same browser still sees the payment method in the store, marked (unlicensed — visible to admins only), so you can set up and test the extension before you buy a key. On OpenCart 4 this preview is not available: the store does not see the admin login, so without an active key the payment method is hidden for everybody. After you have opened the Edit page once, a reminder appears on the admin Dashboard. Close it with × to hide it for 7 days. Existing orders are not affected: payments already started are still confirmed when the customer returns from CCAvenue.

When a license expires, the extension keeps working, but updates and support need a renewal. The status is checked again automatically when you open the admin Dashboard or the Edit page: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling the extension always removes the license key and license status.

Troubleshooting

CCAvenue does not appear at checkout: check that the license is active, Enable/Disable is on and all three credentials are set: Merchant ID, Access Code and Working Key. The settings page shows a warning when one is missing. Also check that the payment address is in the selected Geo Zone and that the order reaches the Total set in the settings.

The payment went through, but the order stays without a status: the customer did not return from CCAvenue to your store, for example because the browser was closed. The extension has no server-to-server notifications. Check the payment in the CCAvenue dashboard and update the order manually.

Every payment ends with We could not confirm the payment result: the response cannot be decrypted. The Working Key is wrong, belongs to another domain or was copied with extra characters. Generate the keys for the domain of this store and paste them again. Turn on Debug log and look at the Log field on the extension page.

CCAvenue shows an error before the payment page: check that the Access Code and Working Key were generated for this domain, that the return URL belongs to the domain registered with CCAvenue and, in test mode, that CCAvenue enabled test access for your account. For a currency other than INR, multi-currency processing must be enabled on your CCAvenue account.

The customer sees This payment method is temporarily unavailable: one of the credentials is missing, or the order total is zero. Debug log shows the reason.

The customer sees This payment method is not available. Please reload the checkout page.: the checkout session no longer matches the order, or the payment method was turned off meanwhile. The customer reloads the checkout.

The customer sees Payment gateway error: encryption failed: the request could not be encrypted. Check that the PHP OpenSSL extension is installed.

The Merchant ID does not change on save: the value contains something other than digits. Enter only the numbers of your Merchant ID.

Order is in the review or awaiting status: read the notes in the VibeFox CCAvenue Payment tab (see Order statuses). Verify the payment in the CCAvenue dashboard, then fulfil the order or refund the payment.

For developers: before the request is encrypted, the extension triggers the OpenCart event ccavenue_p_request_params with the request parameters and the order (for example to set merchant_param2 to merchant_param5; do not change amount, currency, order_id or merchant_param1).

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox CCAvenue Payment. The license key and license status of this extension are always removed. OpenCart always removes its own settings of the extension: Enable/Disable, Sort Order, Geo Zone, Total and the order statuses of the Orders section, which return to their defaults on a re-install. The OpenCart event of the extension is removed too (on OpenCart 4 its events and its startup action, which lets the customer's return through in maintenance mode). If Delete data on uninstall is on, the other extension settings (title, description, credentials, test mode, logging) and the log are removed. If it is off, they are kept for a later re-install. The CCAvenue payment references are always kept. Existing orders keep their payment notes.

On OpenCart 4, to remove the files of the extension as well, go to Extensions > Installer after the uninstall and click Uninstall (the orange − button) next to VibeFox CCAvenue Payment in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

CCAvenue is a trademark of its respective owner. This extension is not affiliated with or endorsed by CCAvenue.