6

我必须在 asp.net 中实现 ccavenue 支付网关。

我在互联网上搜索了很多,但找不到使用 asp.net 的单个工作示例。

我也尝试过来自站点的示例,但它没有记录且不正确。我不知道如何将此服务与 asp.net 一起使用。

4

3 回答 3

4
  1. 将 CCAvenue 发送的 Library 文件夹中的所有 dll 添加到您的 Gac
  2. 从 Avenue 集成工具包中,您将获得三个页面 - Data.aspx、SubmitData.aspx 和 ResponseHandler.aspx
  3. 在您的按钮上,您必须将您的 OrderID、MerchantID(由 CCAvenue 提供)、金额和重定向 URL(您的网站 URL,以便 ASA Payment 将用户重定向到您的站点)传递到 Data.aspx 页面。
  4. 根据单击结帐按钮后将获得的值初始化 Data.aspx 的 TextBox,如上图 3 所示。
  5. 在 SubmitData.aspx.cs 页面中,在 workingkey 变量上初始化您的工作密钥(登录到您的 CCAvenue 帐户后,您将获得您的工作密钥)。

执行此步骤后,您可以将 Avenue 网关集成到您的按钮

有关详细信息,请参阅此 -

http://bhartiwebworld.blogspot.in/2013/09/how-to-do-ccavenue-payment-gateway.html

您还可以使用 magento 进行集成。对于 magento,请查看此视频 -

https://www.youtube.com/watch?v=4e1SiQM-sHA

于 2014-05-14T09:07:04.357 回答
2

我已经解决了。是的,CCAvenue 提供了良好的支持。但是使用 asp.net 论坛的人总是会寻找 asp.net 代码和直接答案。:)

我希望这会对某人有所帮助。我在后面的代码中创建了两个属性。一种是返回校验和值,另一种是返回有关结帐项目的详细信息。

在此处输入代码

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();
     }
 }


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



<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> 
于 2014-05-15T04:35:38.527 回答
1

我必须在 asp.net 中实现ccavenue 支付网关。

你确定你的意思是你需要实现这个吗?你的意思是你想整合它

官方文档

第 12 页的 CC Avenue 文档讨论了如何将 CCAvenue 与 ASP.Net 应用程序集成。

第 1.4 节(第 17 页)提供了一个 ASP.Net 示例,第 1.5 节(第 19 页)展示了如何对其进行测试。如果这些都不起作用,那么联系 CCAvenue 的集成支持听起来是个好主意。

该文档还在第 2 页提到

service@world.ccavenue.com

+91 22 26000816/846

+91 22 26491524

作为一项付费服务​​,他们倾向于为最终用户提供良好的技术支持,以帮助他们将网关与支持的语言(我所看到的 ASP.Net 就是其中之一)集成在一起。

使用 C Sharp 的 ASP.NET 示例

ASP.Net 论坛上的人们有一篇关于使用 C# 进行 CCAvenue 集成的帖子和回复。希望能帮助到你。

备用查询

关于您遇到问题的集成部分的更清晰的问题会有所帮助。赏金似乎正在寻找上面链接到的文档的官方/可信来源。想到以下问题:

  1. 在尝试使用他们的样本时,您是否确保将测试验证密钥替换为真实密钥?
  2. 您在 CCAvenue 网站上的返回 URL是否正确配置?
于 2014-05-14T09:09:33.403 回答