ccavenue payment gateway integration in php demo

in ccavenue payment gateway integration in php, CCAvenue is a most simple payment gateway integration that supports e-merchants a single stop platform for easy processing step by step e-transaction ranging from your any types of the credit card transaction to direct debit from their online netbanking, net banking, credit / debit card payments or any your bank accounts. It is designed to integrate quickly without any hassle. To integrate CCAvenue payment gateway in your website, you should have CCAvenue account and they will give you a merchant id and a unique key for your website to perform transaction. therefor here in this best Article, I have explained easy steps to manage CCAvenue Payment Gateway with PHP.

CCAvenue is the most easy payment gateway in country of the India. As the eCommerce platform is picking A to z momentum as well as some additional at exponential data rate, this is high time you think about more advance level setting up a shopping cart. If you are based out of India then CCAvenue is one among the best selection.

You will also like related best Article to Integrate Payment Gateways

As We have explained step by step earlier that this is very simply to integration, you just required to pass argumend based required input filed to CCAvenue to fully transaction. The CCAvenue gret system expects all the data certain form hiddin input data with each form tag names to be sent to the CCAvenue website. For this reason, this is essential that the names of the form input fields on the merchant website as well as the CCAvenue website should match exactly. as well as there are some form input filed values are compulsory shch as a Merchant_Id, Amount as well as Order_Id. The Merchant_Id as well as working key will be fully assigned to you by CCAvenue. following is form with more action URL to CCAvenue as well as user form input field with required values.

CCAvenue payment gateway integration methods

  • CCAvenue billing page
  • CCAvenue iFrame checkout
  • Custom checkout form
  • CCAvenue shopping cart

Steps to integrate CCAvenue Payment Gateway

These are the steps required for the CCAvenue payment gateway integration in PHP.

  1. step 1: Make Merchant Account.
  2. Step 2: and then you can Login to Merchant Dashboard as well a100% free download CCAvenue payment integration packages.
  3. Step 3: get here your Security keys (like as a Merchant id, Access full source Code, Working key).
  4. Step 4: after that simply Settings CCAvenue security keys and mode of the (like as a test/live) endpoint in your PHP web app.
  5. Step 5: Make Payment form and deploy Http request / response handlers and with the details of the integration packages.
  6. Step 6: here last step to Make return pages for handling payment confirm notification on success web page url or cancel web page url.

CCAvenue payment flow diagram

In this flow diagram, it displays the payment flow between CCAvenue and the PHP web application in which this payment gateway is integrated.

CCAvenue,pay,payment,ccavenue payment gateway integration in php demo,ccavenue payment gateway integration in php source code download
CCAvenue,pay,payment,ccavenue payment gateway integration in php demo,ccavenue payment gateway integration in php source code download

In this flow diagram, it displays the possible methods of payments supported by CCAvenue. As we have already seen, it supports net banking, credit / debit card payments as shown in the figure.

And then the successful payment, the CCavenue will redirect to your provided success URL with the some transaction information with $_GET means ($_REQUEST) get all the variable having auth_status. If it is “YES” then it is successfully user authorized by gateway. If it is “NO” then it is unsuccessful web page transaction. If it is “USER” then it is not authenticated at this point of time.

We also requied to verify the payment gateway information send by CCavenue is tampered or not for that we have to use the verify checksum method verifychecksum($MerchantId,$OrderId,$Amount,$AuthDesc,$CheckSum,$WorkingKey). We requied to pass the transaction information to this method. If it data returns true than the information are ok and payment page was successfully redirect to success web page. If it data returns boolean data false then the information are tampered while sending to our web application as well as something wrong has occurred and requied to redirect to unsuccessful web page .

Use below PHP methods to get check all the data sum using methods getchecksum() and verify returned checksum using method verifychecksum().


Verify the the checksum




> 16) & 0xffff;
	for($i = 0 ; $i < strlen($CCAvenueString) ; $i++) {
	$s1 = ($s1 + Ord($CCAvenueString[$i])) % $DEFAULT ;
	$s2 = ($s2 + $s1) % $DEFAULT ;
	}
	return leftshift($s2 , 16) + $s1;
}
?>

I hope you get an idea about ccavenue payment gateway integration in php source code download.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment