How to implement the CCAvenue gateway option

We need to implement CCAvenue payment gateway option. How to do this using ASP.net/C#?

+4
source share
3 answers

Please read the Integration Guide on the ccavenue official website. I hope this helps you

http://world.ccavenue.com/content/works_any_shoppingcart.jsp

+2
source

Everything worked out for me. Yes CCAvenue provides good support. But anyone using the asp.net forum will always look for asp.net codes and direct answers. :)

Hope this helps someone. I created two properties in the code. One of them is to return the value of the checksum, and the other is to return details about the checkpoints.

public string CCAvenueItemList { get { StringBuilder CCAvenueItems = new StringBuilder(); DataTable dt = new DataTable(); DataTable dtClientInfo = new DataTable(); dt = (DataTable)Session["CheckedItems"]; dtClientInfo = (DataTable)Session["ClientInfo"]; for (int i = 0; i <= dt.Rows.Count - 1; i++) { string amountTemplate = "<input type=\"hidden\" name=\"Amount\" value=\"$Amount$\" />\n"; string orderTemplate = "<input type=\"hidden\" name=\"Order_Id\" value=\"$Order_Id$\" />\n"; // BILLING INFO string billingNameTemplate = "<input type=\"hidden\" name=\"billing_cust_name\" value=\"$billing_cust_name$\" />\n"; string billingCustAddressTemplate = "<input type=\"hidden\" name=\"billing_cust_address\" value=\"$billing_cust_address$\" />\n"; string billingCountryTemplate = "<input type=\"hidden\" name=\"billing_cust_country\" value=\"$billing_cust_country$\" />\n"; string billingEmailTemplate = "<input type=\"hidden\" name=\"billing_cust_email\" value=\"$billing_cust_email$\" />\n"; string billingTelTemplate = "<input type=\"hidden\" name=\"billing_cust_tel\" value=\"$billing_cust_tel$\" />\n"; string billingStateTemplate = "<input type=\"hidden\" name=\"billing_cust_state\" value=\"$billing_cust_state$\" />\n"; string billingCityTemplate = "<input type=\"hidden\" name=\"billing_cust_city\" value=\"$billing_cust_city$\" />\n"; string billingZipTemplate = "<input type=\"hidden\" name=\"billing_zip_code\" value=\"$billing_zip_code$\" />\n"; billingCustAddressTemplate = billingCustAddressTemplate.Replace("$billing_cust_address$", dtClientInfo.Rows[0]["Address"].ToString()); billingCountryTemplate = billingCountryTemplate.Replace("$billing_cust_country$", dtClientInfo.Rows[0]["Country"].ToString()); billingEmailTemplate = billingEmailTemplate.Replace("$billing_cust_email$", dtClientInfo.Rows[0]["Email_ID"].ToString()); billingTelTemplate = billingTelTemplate.Replace("$billing_cust_tel$", dtClientInfo.Rows[0]["Phone_no"].ToString()); billingStateTemplate = billingStateTemplate.Replace("$billing_cust_state$", dtClientInfo.Rows[0]["State"].ToString()); billingCityTemplate = billingCityTemplate.Replace("$billing_cust_city$", dtClientInfo.Rows[0]["City"].ToString()); billingZipTemplate = billingZipTemplate.Replace("$billing_zip_code$", dtClientInfo.Rows[0]["ZipCode"].ToString()); strAmount = dt.Rows[i]["INR"].ToString(); amountTemplate = amountTemplate.Replace("$Amount$", dt.Rows[i]["INR"].ToString()); orderTemplate = orderTemplate.Replace("$Order_Id$", dt.Rows[i]["ClientID"].ToString()); billingNameTemplate = billingNameTemplate.Replace("$billing_cust_name$", dtClientInfo.Rows[0]["Name"].ToString()); CCAvenueItems.Append(amountTemplate) .Append(orderTemplate) .Append(billingNameTemplate) .Append(billingCustAddressTemplate) .Append(billingCountryTemplate) .Append(billingEmailTemplate) .Append(billingTelTemplate) .Append(billingStateTemplate) .Append(billingCityTemplate) .Append(billingZipTemplate) .Append(deliveryNameTemplate) .Append(deliveryCustAddressTemplate) .Append(deliveryCountryTemplate) } return CCAvenueItems.ToString(); } } 

Another property for returning a checksum is

 public string propcheckSum { get { libfuncs objLib = new libfuncs(); string strCheckSum = objLib.getchecksum("YourMerchantID", Session["ClientID"].ToString(), strAmount, "UrReturnUrl", "your working key"); return strCheckSum; } } 

And used this property in the source view, as shown below

 <div> <%=CCAvenueItemList%> <input type="hidden" name="Merchant_Id" value="yourmerchantID" /> <input type="hidden" name="Checksum" value="<%=propcheckSum%>" /> <input type="hidden" name="Redirect_Url" value="YourWebsite'sThankyoupage.aspx" /> <input type="submit" value="Submit" runat="server" /> </div> 

You can get the seller ID and create a working key on the CCAvenue website. This is in the trade login.

Hope this helps someone at least.

+1
source

You need to register first or contact them and ask for their payment integration guide. I don’t think this is the same as PayPal integration on your site.

0
source

Source: https://habr.com/ru/post/1302101/


All Articles