C# 在asp.net站点中集成Paypal与Paypal webservice

C# 在asp.net站点中集成Paypal与Paypal webservice,c#,asp.net,paypal,paypal-sandbox,C#,Asp.net,Paypal,Paypal Sandbox,我现在还从未使用过任何支付网关……但现在我需要为我的购物车集成paypal。从那里,用户可以购买多个数据,并从贝宝网站支付多个项目。我正在搜索如何将paypal集成到我的网站中。我认为paypal必须有用于支付集成的webservice。我在谷歌搜索,向贝宝提交多个购物车项目数据。我得到了密码,但这不是一个很好的解决方案 String url; url= “https://www.paypal.com/us/cgi-bin/webscr?” ; url+= “cmd=_xclick”; url+

我现在还从未使用过任何支付网关……但现在我需要为我的购物车集成paypal。从那里,用户可以购买多个数据,并从贝宝网站支付多个项目。我正在搜索如何将paypal集成到我的网站中。我认为paypal必须有用于支付集成的webservice。我在谷歌搜索,向贝宝提交多个购物车项目数据。我得到了密码,但这不是一个很好的解决方案

String url;
url= “https://www.paypal.com/us/cgi-bin/webscr?” ;
url+= “cmd=_xclick”;
url+= “&business=vikvish@yahoo.co.in”;
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+= “&currency_code=USD”;
Response.Redirect(url);
这样我就不想发送多个购物车数据到贝宝网站

另一条路

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='bob@domain.com'>");

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();
protectedvoid btnpypal\u单击(对象发送者,图像单击事件参数e)
{
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.Write(“”);
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"
System.Web.HttpContext.Current.Response.Write(
"
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(
"");
System.Web.HttpContext.Current.Response.Write(“”);
System.Web.HttpContext.Current.Response.Write(“”);
System.Web.HttpContext.Current.Response.End();
}

通过这种方式,我们将购物车项目数据从代码隐藏发送到paypal站点

我需要通过paypal webservice将我的多个购物车项目发布到paypal。 所以请从头到尾详细地告诉我所有的步骤。我需要做什么。
我是否需要在paypal端创建买家和卖家双方帐户。如何获取paypal web服务url。我需要样本paypal web服务代码,用于将我的多个paypal购物车项目数据发送到paypal。如何测试一切正常。paypal沙盒url是什么。我是否需要为沙盒url提供有效的信用卡号码。如果是,那么钱将是多少从sandbox url测试后再次返回。请详细讨论所有要点,并用示例代码逐步指导我,包括从帐户创建到使用web服务将多个购物车数据发送到paypal网站的所有阶段。感谢paypal在不同平台上为其所有产品提供了良好的定义和公开可用性

阅读他们的文档并遵循他们文档化的API说明,而不是试图拼凑一个“变通方法”,这对你很有好处——是的,你可以很容易地这样做(为HTML表单创建变通方法),但你可能会错过安全性——例如,在上面的代码中,任何人都可以检查和篡改你所有的表单POST值。

u说“在上面的代码中,任何人都可以检查和篡改您的所有表单POST值。”因此,如何确保安全。