【发布时间】:2016-06-06 16:47:50
【问题描述】:
我想创建一个捐赠按钮,用户可以在输入文本字段中输入他想要捐赠的金额,然后点击捐赠来支付这笔金额。
这是我在生成捐赠按钮时得到的(我不想要选项)
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="my@email.com">
<input type=text" name"price" value"" required>
<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">
<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Donation">
<input type="hidden" name="item_number" value="Donation">
<select name="amount"><option value="10.00">€10.00</option><option value="25.00">€25.00</option></select>
<input type="hidden" name="currency_code" value="EUR">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="PayPal - The safer, easier way to pay online">
</form>
如何将变量从文本字段传递到捐赠按钮并删除选项? API 是否支持?
【问题讨论】:
-
您在输入价格中忘记了
= -
无论哪种方式,上面的代码都不起作用
标签: javascript html paypal paypal-sandbox