我想在ASP.NET MVC 3.0应用程序中使用http://paypalhelper.codeplex.com。贝宝帮手需要一些帮助
这样的步骤我做:
:1)在Global.asax中
PayPal.Profile.Initialize("namehere", "passwordhere", "signaturehere", "sandbox");
2)比对Razor视图我宣布立即购买按钮与我的测试值注册贝宝助手
@{
var paypalButton = PayPal.ButtonManager.BuyNowButton.Create("sellerhere", "itemname", "10.00");
HtmlString paypalButtonHtml = new HtmlString(paypalButton.WebSiteCode);
}
@paypalButtonHtml
所以结果我有一个HTML:
<input type="hidden" name="cmd" value="_s-xclick"/>
<input type="hidden" name="hosted_button_id" value="SECRET_VALUE_HERE"/>
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"/>
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"/>
比我点击那个按钮的页面发布到我的应用程序,但我预计它会被重定向到paypal
网站继续付款。
我错过了什么吗?
我该怎么办才能将用户重定向到paypal paynow
页面?