paypal invalid ipn |
[eluser]jtotheb[/eluser]
Ah right okay, in understand now. one final question! "// Post the data back to paypal" Why do you do this? Is this another level of security by checking with paypal that what you just received is from them and not someone else?
[eluser]Khoa[/eluser]
Hi, It took me about 2 hours and still couldn't figure out what is the problem here. For some reason, the function ipn() inside the controller is just not called. To test the data, I put in some debugging code that writes a file log as: Code: // Inside the controller, which can be accessed at http://localhost/testSite/product/ipn I double, triple checked the followings and they are all fine: - the notify_url exists in the form with value = http://localhost/testSite/product/ipn. So, can be sure that the url is sent to paypal - when copy the address http://localhost/testSite/product/ipn and paste it to the browser, it does write out the debug_paypal.log file. This ensures that url can be accessed and once accessed, it works. So all I can see is that function does not get called at any stage at all. I'm testing on the sandbox, not try the live server yet. But I read in this forum that people say it still works with sandbox, right? So is there anything I missed? I can post the full code here if anyone is interested in. BTW, at what stage do we expect the ipn() function to be called? Here are a couple of steps I see in the process: 1. User click on the "buy now" button which is the form with return url, cancel url, notify url and all other stuff 2. They are taken to paypal 3. Login to paypal 4. See the payment summary page, the page with title "Review your payment" 5. Then, user click on the "pay now" button 6. See the thank you page with the title "Thank you for your payment" 7. Then, there is a link saying "Return MY NAME's test store" So, at what step is the function called? My project due date is getting SOOOOO CLOSE now, I really really really need to solve this out urgently. Any help or experience to share would be very much appreciated! Thanks, Khoa
[eluser]ray73864[/eluser]
ipn is called as soon as the person presses the 'pay now' button i believe, basically ipn is for validating the data instead of requiring a ssl connection, so the person clicks 'pay now' on paypal, paypal sends all the data to your server's ipn function, the ipn function packages it all up and sends it back to paypal exactly as it received it, if paypal receives it back correctly then it is assumed to be coming from your server. if i remember correctly though, i believe the ipn stage can happen at any time after they press the paynow button, it will be whenever the paypal server has a free moment to do it.
[eluser]Khoa[/eluser]
Thanks for the quick response ray, So why is the function ipn not called then? I noticed one thing. After a payment is made, I double check in both the buyer and seller accounts in the sandbox, there is a list of transactions at the bottom. Sometimes the transaction is said to be "Completed", sometimes it says "Unclaimed". Do you have any idea about it? Can this be related to the fact that I do not receive the ipn? You said "it will be whenever the paypal server has a free moment to do it.", what do you mean by this? It sounds like you have some experience with the fact that Paypal delays the transactions, can you share? If paypal does not process it instantly, is there any case that ipn function will be called at some later stage in the future? Like I buy sth in the morning, but it won't be processed until midnight and that's when the ipn function is called? Sorry to have so many question, but to be honest, at this time, I don't really care, or more correctly, don't have time to care about how paypal works, I just need to get this work asap. I will be in BIG BIG trouble if I cannot get this done by this christmas :-( Is there any way I can contact you directly to ask for your help on this? Like emailing you directly? Thanks ray.
[eluser]Khoa[/eluser]
I just tested it with the live server, and it doesn't work either!!! :-(
[eluser]Unknown[/eluser]
Hi sph. could you help me please....?? i have a code for an IPN listener, and im working with sandbox. The response is always INVALID and I've tried diferrent things to prove that, thats the only problem.... Code: <?php when I was debugging my code i found this at $res.... HTTP/1.1 200 OK Date: Mon, 03 Jun 2013 19:36:31 GMT Server: Apache X-Frame-Options: SAMEORIGIN Set-Cookie: cwrClyrK4LoCV1fydGbAxiNL6iG=ZlLtTHhoH2... Set-Cookie: cookie_check=yes; expires=Thu, 01-Jun-... Set-Cookie: navcmd=_notify-validate; domain=.paypa... Set-Cookie: navlns=0.0; expires=Sun, 29-May-2033 1... Set-Cookie: Apache=10.74.8.69.1370288191671154; pa... Vary: Accept-Encoding Strict-Transport-Security: max-age=14400 Connection: close Content-Type: text/html; charset=UTF-8 INVALID |
Welcome Guest, Not a member yet? Register Sign In |