1,105,578 Community Members

Paypal integration issue

Member Avatar
saadi06
Junior Poster
133 posts since Oct 2010
Reputation Points: 2 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 1 [?]
 
0
 

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

Member Avatar
chrishea
Posting Virtuoso
1,524 posts since Sep 2008
Reputation Points: 182 [?]
Q&As Helped to Solve: 256 [?]
Skill Endorsements: 6 [?]
 
0
 

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

Member Avatar
saadi06
Junior Poster
133 posts since Oct 2010
Reputation Points: 2 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 1 [?]
 
0
 

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: