我如何在贝宝按钮中更改隐藏值

发布于 2025-01-24 11:58:05 字数 706 浏览 2 评论 0 原文

我们正在创建一个简单的销售网站,用于本地拾取,因此,在保持简单的过程中,我们决定使用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>

We are creating a simple sales site for local pickup no shipping, so in keeping it simple, we decided to use Vb.net and SQL Server, creating a catalog page and detail page with buying it now Paypal button. In using SQL server it will fill out the details page but we like it to be able to change the "value" in the following line : . (the value is given when creating a button, but stored the value in SQL) Is there a simple solution

<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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ˇ宁静的妩媚 2025-01-31 11:58:05

考虑到这一点,您可能会以错误的方式解决这个问题。没有理由将托管按钮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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文