【问题标题】:how to use ccavenue payment gateway in asp.net如何在 asp.net 中使用 ccavenue 支付网关
【发布时间】:2014-03-12 05:26:24
【问题描述】:

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

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

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

【问题讨论】:

    标签: asp.net payment gateway ccavenue


    【解决方案1】:
    1. 将 CCAvenue 发送到您的 Gac 的 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

    【讨论】:

    • 第一个链接已被删除。如果可能,请更新您的答案。谢谢
    【解决方案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> 
    

    【讨论】:

    • 您只是在回复前 19 小时粘贴了我在 my answer 中链接的帖子。 :|
    【解决方案3】:

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

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

    官方文档

    CC Avenue Documentation on page 12 讨论如何将 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 论坛上的人们有一篇关于 CCAvenue integration using C# 的帖子和回复。希望对您有所帮助。

    备用查询

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

    1. 在尝试使用他们的样本时,您是否确保将测试身份验证密钥替换为真实密钥
    2. 您的返回网址是否在 CCAvenue 网站上正确配置?

    【讨论】:

      猜你喜欢
      • 2017-09-23
      • 1970-01-01
      • 1970-01-01
      • 2015-12-21
      • 2017-12-19
      • 2015-01-16
      • 2011-08-07
      • 2015-04-23
      • 2019-05-04
      相关资源
      最近更新 更多