我希望我的paypal按钮能够从我的自定义表单中捕获信息,因此所有用户在按下后都需要进行付款。我的自定义表单只有两个字段:金额和电子邮件地址。它甚至可能吗? 谁知道如何使用PHP做到这一点?谢谢
答案 0 :(得分:0)
如果我理解你的问题,那么这个例子就应该是你想要的了:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Paypal</title>
</head>
<body>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<!-- Change the email -->
<input type="hidden" name="business" value="email@email.com">
<!-- Change the return email after payment -->
<input type="hidden" name="return" value="http://google.com">
<!-- Change the description of the item -->
<input type="hidden" name="item_name" value="Item name"/>
<input type="text" name="user_email" placeholder="Please enter email" value=""/>
<input type="hidden" name="no_shipping" value="1">
<input type="text" name="user_amount" placeholder="Please enter amount" value="">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<button type="submit" alt="PayPal - The safer, easier way to pay online!">Pay now</button>
</form>
</body>
</html>
答案 1 :(得分:0)
删除姓名为&#34的电子邮件;电子邮件&#34;和名称=&#34;金额&#34;并标记可见输入user_email和user_amount,填写并发送表单