从数据库中检索电子邮件,从 paypal 获取代码,然后将您的 $email 变量放入输入值中。
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value='".$email."'> // here the email from DB
<input type="hidden" name="lc" value="US">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_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>
如果您不想要按钮,只需链接到 您格式化的变量https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=test%40hotmail%2ecom&lc=US&button_subtype=services¤cy_code=USD&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHosted
在哪里business=test%40hotmail%2ecom