tinkers/ccavenue-php-composer-lib

ccavenue composer enabled integration kit

1.0.4 2017-01-23 13:36 UTC

This package is auto-updated.

Last update: 2024-05-06 08:55:37 UTC


README

Description

This is a composer supported library for ccavenue payment gateway.

Installation

With Composer (Recommended)

To install with composer you need to have composer installed on your system.

run this command:
composer require tinkers/ccavenue-php-composer-lib

OR

add this inside your composer.json section:

    {
        "require": {
           "tinkers/ccavenue-php-composer-lib": "^1.0"
           /*....*/
        }
    }

Usage

<?php
use tinkers\ccavenue\CCAvenue;

$cCAvenue = new CCAvenue(CCAvenue::TYPE_BILLING_PAGE, [
            'merchant_id' => 'xxxxxx',
            'access_code' => 'xxxxxxxxxxxxxxxxx',
            'working_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        ], true);
        
$request = $cCAvenue->requestGenerator($requestData); // accepts billing page post data and provides array encrypted data and form-action/iframe url

Above CCAvenue::requestGenerator() will output:

    [
        'encrypted_data' => 'form encrypted_data',
        'access_code' => 'access_code',
        'form_action' => 'https://secure.ccavenue.com/transaction/transaction.do?command=initiateTransaction',
    ]

this output can be used to generate request handler form.