We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,931 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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

2
Contributors
2
Replies
22 Hours
Discussion Span
1 Year Ago
Last Updated
3
Views
saadi06
Junior Poster in Training
96 posts since Oct 2010
Reputation Points: 12
Solved Threads: 2
Skill Endorsements: 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,484 posts since Sep 2008
Reputation Points: 223
Solved Threads: 243
Skill Endorsements: 5

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
96 posts since Oct 2010
Reputation Points: 12
Solved Threads: 2
Skill Endorsements: 1

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0744 seconds using 2.84MB