In this tutorial, we will see how to avoid Error Code 21002 currency required parameter missing.
This is a usual problem that occurs after connecting our application to the CCAvenue payment gateway. Due to some input values that are missing by developers while coding, such error occurs.
CCAvenue is one of the leading online payment gateway service provider similar to other popular providers PayPal, Citrus, PayUMoney etc. Easy integration is an advantage of CCAvenue payment gateway. But, due to very minor mistakes in coding, developers get few errors while integrating CCAvenue with their application.
CCAvenue have provided some guidelines of integration that are necessarily needed to be followed while integrating it into the application. Inputs values like amount, currency, merchant_id, redirect_url, cancel_url etc are minimum required and should be included in the form before sending the data to CCAvenue page. If we avoid them or forgot to use them into the code, CCAvenue throws the error.
As mentioned above Currency is one of the required values that should be mentioned in code while integrating with an application. Developers either forgot to mention it or mention it in wrong way.
1. Forgot to add an input with name currency in the form,
2. Forgot to assign the value to currency input,
3. Assigns the wrong value to currency input. (currency should have only alphabets and maximum length is 3 but developer sometimes use numbers or special characters as well).
2. Assign the value to the currency input,
3. Assign proper value (only alphabets with maximum length 3 only. no numbers or special characters) to the currency input
So, in this tutorial we have discussed how to avoid Error Code 21001 currency required parameter missing. Hope, this is useful for you to avoid the error caused by minor mistakes. Please share this post if you like this.
This is a usual problem that occurs after connecting our application to the CCAvenue payment gateway. Due to some input values that are missing by developers while coding, such error occurs.
CCAvenue have provided some guidelines of integration that are necessarily needed to be followed while integrating it into the application. Inputs values like amount, currency, merchant_id, redirect_url, cancel_url etc are minimum required and should be included in the form before sending the data to CCAvenue page. If we avoid them or forgot to use them into the code, CCAvenue throws the error.
As mentioned above Currency is one of the required values that should be mentioned in code while integrating with an application. Developers either forgot to mention it or mention it in wrong way.
What mistake developers make:
If you see below code, you can find a line with yellow background having a line with an input name currency. This line of code is the reason behind the error code 21002 currency required parameter missing. Developers mostly make 3 type of mistakes:1. Forgot to add an input with name currency in the form,
2. Forgot to assign the value to currency input,
3. Assigns the wrong value to currency input. (currency should have only alphabets and maximum length is 3 but developer sometimes use numbers or special characters as well).
<table>
<tr>
<td>Parameter Name:</td><td>Parameter Value:</td>
</tr>
<tr>
<td colspan="2"> Compulsory information</td>
</tr>
<tr>
<td>TID:</td><td><input type="text" name="tid" id="tid" readonly /></td>
</tr>
<tr>
<td>Merchant Id:</td><td><input type="text" name="merchant_id" value="xxx"/></td>
</tr>
<tr>
<td>Order Id:</td><td><input type="text" name="order_id" value="123654789"/></td>
</tr>
<tr>
<td>Amount:</td><td><input type="text" name="amount" value="10.00"/></td>
</tr>
<tr>
<td>Currency:</td><td><input type="text" name="currency" value="INR"/></td>
</tr>
<tr>
<td>Redirect URL:</td><td><input type="text" name="redirect_url" value="http://localhost/ccavResponseHandler.php"/></td>
</tr>
<tr>
<td>Cancel URL:</td><td><input type="text" name="cancel_url" value="http://localhost/ccavResponseHandler.php"/></td>
</tr>
<tr>
<td>Language:</td><td><input type="text" name="language" value="EN"/></td>
</tr>
</table>
The Solution
1. Don't forgot to add currency input,2. Assign the value to the currency input,
3. Assign proper value (only alphabets with maximum length 3 only. no numbers or special characters) to the currency input
So, in this tutorial we have discussed how to avoid Error Code 21001 currency required parameter missing. Hope, this is useful for you to avoid the error caused by minor mistakes. Please share this post if you like this.
Comments
Post a Comment