CCavenue is most puplar Payment gateway for web and mobile application. CCavenue provides functionality to receive payment using International credit card, using Online Internet banking which has partnership with CCavenue and debit card(ATM card).Now its supporting UPI Payments.

This php payment gateway tutorial help to integrate CCavenue with your PHP e-commerce start CCavenue payment on your web application.You need to register your business with with CCavenue and get merchant id and a unique key for your website to perform transaction.


You can check other recommended tutorial of Payment Gateway,

CCAvenue provides its net banking services for many banks in many countries. Some of these most important companies include as follow,

  • Axis Bank.
  • Andhra Bank.
  • Bank of India.
  • Bank of Bahrain & Kuwait.
  • Bank of Maharashtra.
  • Canara Bank.
  • Catholic Syrian Bank.
  • Central Bank of India.
  • Dhanlakshmi Bank.
  • HDFC Bank.
  • ICICI Bank.
  • Union Bank.
  • Indian Overseas Bank.
  • Jammu & Kashmir Bank.
  • Karnataka Bank.
  • Punjab National Bank.
  • Royal Bank of Scotland and many others.

ATM Card Accepted

  • Canara Bank.
  • Citi Bank.
  • Indian Overseas Bank.
  • Punjab National Bank.
  • State Bank of India.
  • Union Bank of India and many others

Some of Popular Credit Card Accepted

  • Master Card (Maestro and Cirrus).
  • Visa (Electron and Plus).

I will use CCAvenue-PHP-Library open source library which has all supported methods to do transaction with CCAvenue account.

We will send required fields data to CCAvenue website using libs method.We need to make sure the input fields should match with CCAvenue payment gate way required fields name.The required fields are Merchant_Id, Amount, Order_Id and website must have merchant key.We will create bootstrap form
into index.php file.

'; echo ''; ?>

As you can see above, we have added form action value is CCAvenueController.

We will add some php code to do payment on CCAvenue using above form values.

', '', '' );
// set details 
$ccavenue->setAmount( '' );
$ccavenue->setOrderId( '' );
$ccavenue->setBillingName( '' );
$ccavenue->setBillingAddress( '' );
$ccavenue->setBillingCity( '' );
$ccavenue->setBillingZip( '' );
$ccavenue->setBillingState( '' );
$ccavenue->setBillingCountry( '' );
$ccavenue->setBillingEmail( '' );
$ccavenue->setBillingTel( '' );
$ccavenue->setBillingNotes( '' );
// copy all the billing details to chipping details
// get encrpyted data to be passed
$data = $ccavenue->getEncryptedData();

You get response and send response.php file,

response( $response );

Genislab Technologies

NexGeneration complete end-2-end software testing & modern development operations tooling & solutions

Do you want to discuss your testing requirements with us? please don’t hesitate to hit the contact us button below, and we will get back to you at our earliest..