Posted inTechnology

ccavenue payment gateway integration in codeigniter

In this post we will show you CCAvenue Payment Gateway Integration using PHP, hear for CCAvenue Payment Gateway Integration using PHP we will give you demo and CCAvenue Payment Gateway Integration using PHP example for implement.

ccavenue payment gateway integration in codeigniter

CCAvenue is a popular payment gateway that offers e-merchants a one stop solution for processing e-merchants ranging from credit card transaction to direct debit from their online 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. So here in this tutorial, I have explained easy steps to integrate CCAvenue Payment Gateway with PHP.

In this post, we will learn about Ccavenue Payment Gateway Integration In Php Demo with an example.

As I have explained earlier that it is very easy to integrate, you just need to pass required input filed to CCAvenue to complete transaction. The CCAvenue system expects certain input data with specific names to be sent to the CCAvenue website. For this reason, it is essential that the names of the input fields on the merchant website and the CCAvenue website should match exactly. Also there are some input filed values are mandatory like Merchant_Id, Amount and Order_Id. The Merchant_Id and working key will be assigned to you by CCAvenue. Below is form with action URL to CCAvenue and input field with required values.

Code for CCAvenue Payment Gateway Integration using PHP


 

Demo for how to CCAvenue Payment Gateway Integration using PHP

After the fruitful installment, the CCavenue will divert to your furnished achievement URL with the some exchange points of interest with $_GET variable having auth_status. In the event that it is “Y” at that point it is effectively approved by entryway. In the event that it is “N” at that point it is unsuccessful exchange. In the event that it is “B” at that point it is not confirmed now of time.

We additionally need to confirm the installment passage points of interest send by CCavenue is altered or not for that we need to utilize the check checksum work verifychecksum($MerchantId,$OrderId,$Amount,$AuthDesc,$CheckSum,$WorkingKey). We have to pass the exchange points of interest to this capacity. In the event that it returns valid than the points of interest are alright and installment page was effectively divert to progress page. On the off chance that it returns false then the subtle elements are altered while sending to our application and something incorrectly has happened and need to divert to unsuccessful page.

Use below PHP functions to get check sum using function getchecksum() and verify returned checksum using function verifychecksum().

Get the checksum of product


Verify the the checksum of product


Verify the the checksum of product


Get cdec for Verify the the checksum of product


Get adler32 Verify the the checksum of product

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

Hope this code and post will helped you for implement CCAvenue Payment Gateway Integration using PHP. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve pakainfo. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs pakainfo.com

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype