我想通过PayPal付款后在后台运行一个功能。
这是我的表格:
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="email">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="{{item.title}}">
<input type="hidden" name="amount" value="{{item.price}}">
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
我跟着Paypal tutorial,但如果付款成功完成,他们没有显示如何运行功能。
是否可以这样做?
答案 0 :(得分:1)
付款完成后,Paypal会向您发送GET参数。通过这种方式,您可以运行if语句并查看是否存在GET,然后运行您的函数。
if (!empty($_GET)) {
// Your function
}