CCAvenue Payment Gateway Integration in PHP –
In this tutorial I am going to share simple php script to integrate CCAvenue Payment Gateway. It is most popular payment gateway but expensive as compared to any other gateway, but presents your customers with lot of payment options, including wallets. Also success rate and reliability is good. South Asia’s largest payment gateway solution powering thousands of eMerchants with real time, multi-currency, multiple payment options online payment processing services. The solution is powered by proprietary technology that integrates transaction-processing, advance shopping cart, auction payment collection facility, fraud control, financial reporting and order tracking. Collect payments in 27 major foreign currencies and allow your customer to pay in the currency they know best, Multilingual Checkout Page, 200+ Payment Options, 17+ Shopping cart plugins. So if your we based application in PHP then here you’ll get solution to integrate CCAvenue Payment Gateway in PHP.
Install library via composer.
composer require kishanio/ccavenue
Include the library on page, don’t forget to generate
'merchant_id', 'working_key', 'redirect_url' from CCAvenue website. and set required parameter like
Amount, billing_cust_name, billing_cust_address and so on.
require_once __DIR__ . '/../vendor/autoload.php'; use Kishnio\CCAvenue\Payment as CCAvenueClient; $ccavenue = new CCAvenueClient( '<merchant_id>', '<working_key>', '<redirect_url>' ); // set details $ccavenue->setAmount( '<Amount>' ); $ccavenue->setOrderId( '<order_id>' ); $ccavenue->setBillingName( '<billing_cust_name>' ); $ccavenue->setBillingAddress( '<billing_cust_address>' ); $ccavenue->setBillingCity( '<billing_cust_city>' ); $ccavenue->setBillingZip( '<billing_cust_zip>' ); $ccavenue->setBillingState( '<billing_cust_state>' ); $ccavenue->setBillingCountry( '<billing_cust_country>' ); $ccavenue->setBillingEmail( '<billing_cust_email>' ); $ccavenue->setBillingTel( '<billing_cust_tel>' ); $ccavenue->setBillingNotes( '<billing_cust_notes>' ); // copy all the billing details to chipping details $ccavenue->billingSameAsShipping(); // get encrpyted data to be passed $data = $ccavenue->getEncryptedData(); // merchant id to be passed along the param $merchant = $ccavenue->getMerchantId();
Create simple form where which you can submit on user action.
After successful payment process you will get payment response in below parameter and you now redirect invoice page or any page your want.
require_once __DIR__ . '/../vendor/autoload.php'; use Kishnio\CCAvenue\Payment as CCAvenueClient; // Get Response $response=$_POST["encResponse"]; $ccavenue = new CCAvenueClient( '<merchant_id>', '<working_key>', '<redirect_url>' ); // Check if the transaction was successfull. echo $ccavenue->response( $response );
See live demo and download source code.
FREE PHP CCAvenue Payment Gateway Integration Script
Following are the list of popular top rated hand picked PHP CCAvenue Payment Gateway Integration.
- ionic-php-ccavenue-integration:- Non-Seamless integration with CCAvenue for Android through IONIC and php
- ecommerce-php-mysql-ccavenue:- Add to cart functionality in php and mysql with ccavenue payment gateway integration
- CCAvenue_API:- CCAvenue payment gateway api integration in php
- ccavenue-php:- CCAvenue Payment Gateway PHP Library
- ccavenue-php-composer-lib:- MIT license
- ccavenue-payment-gateway-integration-with-php:- CCAVENUE payment gateway integration with php
- Razorpay-and-ccavenue-payment-for-php-with-source-code-:- payment gateway for ccavenue and razor pay
- Yii2-ccavenue:- CCAvenue payment gateway integration for PHP – Yii2 framework
- Codeigniter-website-with-admin-panel-and-ccavenue-payment-gateaway-integration:- Website built using codeigniter framework with admin panel and search, currency conversion, add to cart functionalitiâ€¦
I Hope you liked Hand-picked list of PHP CCAvenue Payment Gateway Integration, Don’t forget to Subscribe My Public Notebook for more useful Hand-picked PHP and MySql code examples, tutorials and articles.