ASP.net - 集成表单问题
WorldPay 支付网关建议使用此 HTML 将客户带到支付页面:
<form action="https://select-test.wp3.rbsworldpay.com/wcc/purchase" name="BuyForm" method="POST">
<input type="hidden" name="instId" value="211616">
<input type="hidden" name="cartId" value="abc123">
<input type="hidden" name="currency" value="GBP">
<input type="hidden" name="amount" value="0">
<input type="hidden" name="desc" value="">
<input type="hidden" name="testMode" value="100">
<input type="submit" value="To Payment!">
</form>
如何将此表单放在我的页面上?问题是我有一个母版页,它将内容页内容包装在 ASP.net 表单中,我无法嵌套表单。
The WorldPay payment gateway suggests using this HTML to take the customer to the payment page:
<form action="https://select-test.wp3.rbsworldpay.com/wcc/purchase" name="BuyForm" method="POST">
<input type="hidden" name="instId" value="211616">
<input type="hidden" name="cartId" value="abc123">
<input type="hidden" name="currency" value="GBP">
<input type="hidden" name="amount" value="0">
<input type="hidden" name="desc" value="">
<input type="hidden" name="testMode" value="100">
<input type="submit" value="To Payment!">
</form>
How to I put this form on my page? The problem is I have a master page which wraps the content pages content in the ASP.net form, I can't nest the forms.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这有点黑客行为,但我过去曾在贝宝上使用过它。基本上只需在您尝试发布的表格上方添加一个额外的表格,如下所示:
享受!
This is a bit of a hack, but I have used this with paypal in the past. Basiscally just put and extra form above the form you are attempting to post as in the following:
Enjoy!
您可以自定义 HtmlForm 来使其发挥作用。我在这里给出了一个代码示例:
如何绕过为 paypal 按钮嵌入 html 表单 asp.net
http://www.codersbarn.com/post/2008/03/08/Solution-to-ASPNET-Form-PayPal-Problem.aspx
我已经在母版页中使用过几次了:-)
You can customize the HtmlForm to get this to work. I gave a code sample here:
How to get past embedding a html form for paypal buttons asp.net
http://www.codersbarn.com/post/2008/03/08/Solution-to-ASPNET-Form-PayPal-Problem.aspx
I've used this several times with master pages :-)