954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Paypal integration issue

Hi,
I am having a problem in paypal integration.I have integrated the paypal payment method successfully but the values are inserted in the database when the user returns from the paypal back to the website.I need to make a script that when the payment occurs the values are returned to my website even if the user don't come back to the website so I can insert the values to database.I have searched about paypal IPN but I can not understand.Please Help.
Thanks in advance

saadi06
Junior Poster in Training
76 posts since Oct 2010
Reputation Points: 12
Solved Threads: 1
 

Even if you don't use it, you may want to look at this PayPal IPN class. It works.
PayPal IPN Class

chrishea
Nearly a Posting Virtuoso
1,428 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
 

Thanks chrishea for replying.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
}

Can u plz help me.Thanks

saadi06
Junior Poster in Training
76 posts since Oct 2010
Reputation Points: 12
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: