我从来没有使用任何支付网关,现在仍然....但现在我需要整合贝宝为我的购物车。从那里用户可以购买多个数据,并从多个项目的贝宝网站付款。我正在寻找如何将贝宝整合到我的网站。我认为paypal必须有支付集成的web服务。我搜索谷歌提交多个购物车项目数据贝宝。我得到的代码,但是,这不是很好的解决贝宝与asp.net网站中的paypal webservice集成
String url;
url= “https://www.paypal.com/us/cgi-bin/webscr?” ;
url+= “cmd=_xclick”;
url+= “&[email protected]”;
url+= “&item_name=Sample_testing”;
url+= “&amount=10.50″;
url+= “&quantity=2″;
url+= “&return=http://www.google.com”;
url += “&cancel_return=http://www.rediffmail.com”;
url+= “¤cy_code=USD”;
Response.Redirect(url);
这样,我不想多车数据发送到PayPal网站。
另一种方式在这里。
protected void btnPayPal_Click(object sender, ImageClickEventArgs e)
{
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.Write("<html><head>");
System.Web.HttpContext.Current.Response.Write(
"</head><body onload='document.form1.submit()'>");
System.Web.HttpContext.Current.Response.Write(
"<form action='https://www.paypal.com/cgi-bin/webscr' " +
"name='form1' method='post'>");
System.Web.HttpContext.Current.Response.Write(
"<input type='hidden' name='cmd' value='_xclick'>");
System.Web.HttpContext.Current.Response.Write(
"<input type='hidden' name='business' " +
"value='[email protected]'>");
System.Web.HttpContext.Current.Response.Write(
"<input type='hidden' name='lc' value='US'>");
System.Web.HttpContext.Current.Response.Write(
"<input type='hidden' name='item_name' value='Widget'>");
System.Web.HttpContext.Current.Response.Write(
"<input type='hidden' name='amount' value='100.00'>");
System.Web.HttpContext.Current.Response.Write(
"<input type='hidden' name='currency_code' value='USD'>
System.Web.HttpContext.Current.Response.Write(
"<input type='hidden' name='bn' " +
"value='PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest'>
System.Web.HttpContext.Current.Response.Write(
"<input type='image' " +
"src='https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif' " +
"border='0' name='submit' alt=''>");
System.Web.HttpContext.Current.Response.Write(
"<img alt='' border='0' " +
"src='https://www.paypal.com/en_US/i/scr/pixel.gif' " +
"width='1' height='1'>");
System.Web.HttpContext.Current.Response.Write("</form>");
System.Web.HttpContext.Current.Response.Write("</body></html>");
System.Web.HttpContext.Current.Response.End();
}
这样,我们是从代码发送车项目数据PayPal网站背后。
我需要通过paypal webservice将我的多个购物车项目发布到paypal。 所以请从头开始详细介绍所有步骤。我需要做什么。 我是否需要创建买方&卖方双方帐户在贝宝结束。如何获得贝宝网络服务的网址。我需要样品贝宝网站服务代码发送我的多个贝宝购物车项目数据贝宝。如何测试这是一切正常。什么是贝宝沙箱网址。我是否需要提供有效的信用卡否沙箱网址。如果是的话,那么从沙箱网址进行测试后,钱又会如何回来。请详细讨论所有要点&指导我使用示例代码逐步执行所有阶段,例如从帐户创建到Web服务使用,以将多个购物车数据发送到PayPal网站。谢谢
你说:“在你的代码中,任何人都可以检查并篡改你的所有FORM POST值。”所以如何做到安全。 – Thomas