开发者

Paypal integration problem

开发者 https://www.devze.com 2023-03-22 18:26 出处:网络
I am having problem in integrating paypal IPN.I am implementing this code but it is not returning me the values to IPN

I am having problem in integrating paypal IPN.I am implementing this code but it is not returning me the values to IPN My form that is made after executing the code is as follow

   <form method="post" name="paypal_form" action="https://www.sandbox.paypal.com/cgi-bin/webscr">

      <input type="hidden" name="rm" value="2"/>

      <input type="hidden" name="cmd" value="_cart"/>

      <input type="hidden" name="business" value="info@something.com"/>

      <input type="hidden" name="return" value="http://abc.com/test.php?action=success"/>

      <input type="hidden" name="cancel_return" value="http://abc.com/test.php?action=cancel"/>
         <input type="hidden" name="notify_url" value="http://abc.com/test.php?action=ipn"/>
         <input type="hidden" name="item_name_1" value="Adob photoshop"/>

      <input type开发者_如何学运维="hidden" name="item_number_1" value="10"/>
        <input type="hidden" name="amount_1" value="15"/>

      <input type="hidden" name="upload" value="1"/>

      <input type="hidden" name="cn" value="1"/>
       <input type="hidden" name="tx" value="TransactionID"/>
       <input type="hidden" name="currency_code" value="USD"/>
        <input type="hidden" name="no_shipping" value="1"/>
        <center><br/><br/>If you are not automatically redirected to paypal within 5 seconds...<br/><br/>
        <input type="submit" value="Click Here"></center>
        </form>

The problem is that the code is working fine for the return and cancel part but when I use this code for IPN it does not give me any value.My code for the IPN is as under

if ($pay->validate_ipn()) {
   //do the insertion I have tested this insertion it is working fine
   }


Have a look at History > IPN History inside your PayPal account. This should show the status of the IPN messages that were sent to you. Click on the message ID if you wish to find out more detailed information.
If it's retrying, double-check your error logs and ensure it's returning a proper HTTP/1.1 200 OK response when accessed by the PayPal IPN service (notify.paypal.com).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号