PayPal按钮上的自定义逻辑
问题描述:
我想要我的PayPal按钮从我的自定义表单中捕获信息,以便所有用户在按下它之后都需要执行付款。我的自定义表单只有两个字段:金额和电子邮件地址。它甚至有可能吗? 任何人都知道如何做到这一点使用PHP?感谢PayPal按钮上的自定义逻辑
答
如果我明白你的问题正确的,那么这个例子应该是你找什么:
<!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 protected]">
<!-- 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>
答
删除与NAME =“电子邮件”输入名称=“量”和标记可见投入的user_email和user_amount ,填写并发送表格