贝宝沙盒IPN php

贝宝沙盒IPN php,php,paypal,paypal-ipn,paypal-sandbox,Php,Paypal,Paypal Ipn,Paypal Sandbox,我正在使用Paypal Sandbox,我有一个订阅按钮,我的问题是如何获得关于付款的通知,比如交易ID或付款状态,比如“待定”、“成功”,以便我可以存储在我的数据库中 我尝试过搜索,到处都能看到IPN,但我不知道如何实现,我确实在我的paypal帐户中注册了IPN,我也有URL,我在那个文件中编写了代码 我的订阅按钮代码如下 <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target=

我正在使用Paypal Sandbox,我有一个订阅按钮,我的问题是如何获得关于付款的通知,比如交易ID或付款状态,比如“待定”、“成功”,以便我可以存储在我的数据库中

我尝试过搜索,到处都能看到IPN,但我不知道如何实现,我确实在我的paypal帐户中注册了IPN,我也有URL,我在那个文件中编写了代码

我的订阅按钮代码如下

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="admin@cypherincorporated.org.in">
<input type="hidden" name="lc" value="IN">
<input type="hidden" name="item_name" value="unlimited">
<input type="hidden" name="return" value="http://103.8.216.147:81/UPS/index.php">
<input type="hidden" name="item_number" value="3">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="80.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="Y">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHostedGuest">
<input type="image" src="images/apply.png" border="0" name="submit" alt="PayPal – The safer, easier way to pay online." style="margin:35px 0 0 70px">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">


沙箱支付工作正常,但我需要一些关于支付或状态的通知。

是的,您应该使用IPN获取支付通知。
请注意,您的IPN侦听器文件应该存在于live server中。IPN在本地主机中不起作用。如果全部设置,您将收到IPN通知,您可以在获得IPN后检查服务器日志或发送自定义电子邮件,以检查您是否收到IPN。

要动态设置IPN,请使用
通知url
变量:

    <input type="hidden" name="notify_url" value="http://path.to/your.ipn.php">

我已经明确表示,我已经在live server上已经存在的文件中编写了IPN代码,我不知道如何继续使用该代码。尝试了相同的方法,不起作用,它显示错误的URL。
    notify_url
        Optional
        The URL to which PayPal posts information about the payment, in the form of Instant Payment Notification messages.