ASP.Net MVC 中的 Google Checkout
我有一个相当简单的 ASP.Net 站点,它使用 google checkout(我有一个图像按钮,其 PostBackUrl 设置为传递隐藏字段值的 Google 地址),效果很好。
我已经将此应用程序移至 MVC,但我不知道如何处理这个问题。我考虑过使用 jQuery 表单,但我不相信这在这种情况下会起作用,因为有时它们会被重定向到 google 页面。有人在 ASP.NET MVC 应用程序中使用过 google checkout 吗?
I have a fairly simple ASP.Net site that uses google checkout (I have an imagebutton with the PostBackUrl set to the Google address passing values of hidden fields) which works fine.
I've been moving this app to MVC and I'm not sure how to handle this. I thought about using jQuery form but I don't believe this would work in this situation because there are times when they're redirected to the google pages. Has anyone used google checkout in an asp.net MVC app?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以执行与之前相同的操作,只是最终需要手动执行。
听起来您只使用基本版本,是吗?
您创建一个 HTML 表单,将操作设置为 Google 结帐流程,添加适当的隐藏字段(您的控制器传递的模型将填充这些正确的值),然后您有一个提交按钮(或图像如果你愿意的话)。
因此,Google 的基本 HTML 页面的一个示例,针对某些 MVC 风格进行了修改,如下所示:
显然,您可以通过使用表单助手 Html.Hidden 等来使所有内容变得更加 MVC 风格,但是那显示了您需要做的事情的基本版本。
You can do the same thing as you were doing before, just you end up doing it manually.
Sounds like you're using just the basic version, yes?
You create an HTML form that has the Action set to the Google checkout process, add in the proper Hidden fields (the model your controller passes down would be populated w/ the correct values for those) and then you have a submit button (or image if you prefer).
So, an example off Google's Basic HTML page, modified for some MVC-ish-ness would be something like this:
Obviously, you could make all that even more MVC-ish by using the form helper Html.Hidden and so on, but that shows the really basic version of what you need to do.