我们需要实施CCAvenue支付网关选项。 如何使用ASP.net/C#来做到这一点?如何实施CCAvenue支付网关选项
4
A
回答
2
请检查集成手册ccavenue官方site.I希望它会帮助你
http://world.ccavenue.com/content/works_any_shoppingcart.jsp
0
你将不得不signup first或contact them并要求他们支付集成手册。我不认为它与在您的网站上集成贝宝相同。
1
我已经解决了。是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>
你可以得到商家ID和产生的工作重点CCAvenue网站。这是在商家登录。
希望这可以帮助至少有人。
相关问题
- 1. CCavenue支付网关不工作magento 1.9
- 2. Shopify自定义支付网关实施
- 3. 安卓支付网关实施
- 4. 条纹支付网关实施
- 5. 如何将CCavenue支付网关集成到我的网站?
- 6. 我们如何知道付款是否成功在印度Ccavenue支付网关
- 7. 法国的支付网关选项
- 8. Android应用程序中CCAvenue支付网关的沙盒模式
- 9. 国际化支付网关实施的最佳方法
- 10. 如何在Java Struts项目中实现支付网关?
- 11. 支付网关
- 12. AngularJS支付网关
- 13. eWay支付网关
- 14. Knet支付网关
- 15. eWay支付网关定期支付
- 16. 实施支付网关时,商户网站应该担心什么?
- 17. 如何开始在PHP中实现DPS支付快速支付网关?
- 18. 实现支付网关电子商务
- 19. 支付网关URL - 首选名称
- 20. 短信支付网站访问选项
- 21. 如何整合paytrace支付网关
- 22. 如何使用Moneris支付网关?
- 23. 如何调试magento支付网关
- 24. 如何集成支付网关
- 25. 如何在corona sdk中支付网关?
- 26. Ccavenue美元付款
- 27. 什么是实施最简单的可能支付网关? (使用Django)
- 28. 如何在我的PHP站点中实现HDFC支付网关?
- 29. 如何在ASP.NET中实现支付网关
- 30. 如何通过支付网关发送款项?