我如何在贝宝按钮中更改隐藏值
我们正在创建一个简单的销售网站,用于本地拾取,因此,在保持简单的过程中,我们决定使用vb.net和sql Server,创建一个目录页面和详细页面,然后购买PayPal按钮。在使用SQL Server时,它将填写“详细信息”页面,但我们希望它能够在以下行中更改“值”:。 (创建按钮时给出该值,但将值存储在SQL中)是否有一个简单的解决方案
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="?????">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑到这一点,您可能会以错误的方式解决这个问题。没有理由将托管按钮ID存储在数据库中;对于有限的HTML网站存在此类按钮。
由于您的网站不仅限于HTML,因此完全分配托管按钮,并使用a (并且可以选择与后端进行交流以创建和捕获订单 - 请参见该指南中的完整堆栈示例,可以在任何环境中实现其后端路由。在您的情况下)
Thinking about this more, you're probably going around this the wrong way. There is no reason to store hosted button IDs in a database; such buttons exist for limited HTML-only websites.
Since your website is not limited to HTML, dispense with hosted buttons entirely and render buttons using a standard PayPal Checkout integration, which uses the JS SDK (and can optionally communicate with a backend to create and capture an order--see the full stack example in that guide, the backend routes of which can be implemented in whichever environment, .net in your case)