Search code examples
phplaravelpayment-gatewayccavenue

Laravel payment gateway - Softon\Indipay\Exceptions\IndipayParametersMissingException


I am having a laravel project on the local system I have used the following package for ccavenue payment gateway.

Package name: https://github.com/softon/indipay

following is my configuration file

'gateway' => 'ccavenue',               // Replace with the name of default gateway you want to use
'testMode'  => true,                   // True for Testing the Gateway [For production false]

'ccavenue' => [  
        // CCAvenue Parameters
        'merchantId'  => env('INDIPAY_MERCHANT_ID', '*****'),
        'accessCode'  => env('INDIPAY_ACCESS_CODE', '*****'),
        'workingKey' => env('INDIPAY_WORKING_KEY', '*****'),

        // Should be route address for url() function
        'redirectUrl' => env('INDIPAY_REDIRECT_URL', 'indipay/response'),
        'cancelUrl' => env('INDIPAY_CANCEL_URL', 'indipay/response'),

        'currency' => env('INDIPAY_CURRENCY', 'INR'),
        'language' => env('INDIPAY_LANGUAGE', 'EN'),
],

and here is my controller code

public function payment()
{
    $parameters = [
            'transaction_no' => time(),
            'merchant_id' => env('INDIPAY_MERCHANT_ID'),
            'redirect_url' => env('REDIRECT_URL'),
            'cancel_url' => env('CANCEL_URL'),
            'currency' => "INR",
            'language' => 'EN',
            'redirect_url'=>env('INDIPAY_REDIRECT_URL'),
            'cancel_url' =>env('INDIPAY_CANCEL_URL'),
            'order_id' => 12345,
            'amount' => 1,
            'name' => '**** ****',
            'email' => '*****@****.com'
    ];
    
    $order = Indipay::prepare($parameters);
    return Indipay::process($order);
}

and following error I am getting

enter image description here


Solution

  • I have solved this error by bypassing all necessary parameters in the same

    Here I am using ccavenue as a payment gateway

    For Example :

    $parameters = [
        'transaction_no' => time(),                  // necessary paramenets
        'merchant_id' => env('INDIPAY_MERCHANT_ID'), // necessary paramenets
        'redirect_url' => url('payment'),            // necessary paramenets
        'cancel_url' => url('payment'),              // necessary paramenets
        'currency' => "INR",                         // necessary paramenets
        'language' => 'EN',                          // necessary paramenets
        'order_id' => 12345,                         // necessary paramenets
        'amount' => 1,                               // necessary paramenets
        'name' => '***** *****',
        'email' => '*****@*****.com'
    ];