Delivery status SENT but no IPN responce - paypal-ipn

I configured IPN listener and enable auto-respond by using URL. i test using IPN simulator it runs perfectly but auto respond is not working properly. IPN History given proper details but DB not changed.
Details are:
Instant Payment Notification (IPN) details
Message ID20A455865K857272G
Date/time created4/17/2013 04:25 PDT
Original/ResentOriginal
Latest delivery attempt date/time4/17/2013 04:25 PDT
Notification URLhttp://testdomain.com/pwo_dev/index.php/user/PaypalIPN
HTTP response code 200
Delivery statusSent
No. of retries0
Transaction ID77S48208XN775144R
IPN typeTransaction made
But when i resending same IPN then it is working fine.
Please tell me what is the problem.

Have you checked your server's access log to see if PayPal is actually hitting your script, or checked your error logs to see if any errors are being generated. First you need to determine if you are actually getting the data sent to your system. Then once you have determined that you need, to determine why your script is not working. The error logs can help with this. You can also try adding some debug lines to your code so that you can step through it and see where it is failing at. There are also some IPN Troubleshooting Steps here that may help as well. If want to verify that it is a script issue and not a server issue, try using a simplified version of an IPN script. Have it just send you an email, or write something to text file. You can also find some of PayPal's IPN scripts here that may help, and give you a working example to test with.

Related

URL to use for Paypal IPN Simulator

I am using the simulator at https://developer.paypal.com/webapps/developer/applications/ipn_simulator to check my IPN script located at www.domain.com/ipn.asp
as part of my own IPN script, i need to re-post the IPN message that i receive, back to Paypal.
if i post back to https://www.sandbox.paypal.com/cgi-bin/websc -
the IPN simulator gives me a failed message ("We're sorry, we could not send an IPN.").
But if i post back to https://www.paypal.com/cgi-bin/webscr (the
live script) - the IPN simulator gives me a success message ("IPN sent successfully") - BUT,
my own IPN scripts tells me that the final response from paypal -
was INVALID, even though i am posting everything back along with
the cmd=_notify-validate&
So - what URL should i be using, and could there be any reason i keep getting this INVALID final response?
thanks!
https://www.sandbox.paypal.com/cgi-bin/webscr is the correct address for testing with the sandbox. The address you listed in your question is missing the r at the end of webscr.
There are a lot of reasons you could be getting an INVALID response. You'll need to debug your code to find the issue. I used PHP for my IPN listener, so I can't be of much help with that.

IPN Delivery Failed:I/O error

been trying to wrap my head around an issue I have with the IPN tester, not 100% sure if its my hosting company's problem or Paypal Developer 'beta' to be honest but my IPN's have worked fine on a few sites I have for atleast a year and now it doesn't on any of them. I've not changed anything and now im getting
IPN Delivery Failed:I/O error: www.mywebsitesname.co.uk; nested exception is java.net.UnknownHostException: www.mywebsitesname.co.uk
and none of my NotifyUrl.ashx handlers are working.
any ideas what this actually means in english? any more info. from me required to help you diagnose my issue?
#
AS AN UPDATE (27-08-2013), I thought I would try out the original C# SDK sample code from Paypal that I used to set up my IPN's with about a year or three ago (ie. it worked great with the IPN simulator). I have put it onto two different hosting companies servers to check its not an issue with a particular hosting server and my results using the IPN Simulator show "error 500: internal server error" for one and "IPN Delivery Failed:I/O error: www.ang##########.co.uk; nested exception is java.net.UnknownHostException: www.ang############.co.uk".
In short, I have the same identical sample file from Paypal (that used to work) in the root of each hosting companies servers and im using the same IPN simulator settings, with the exception of the IPN handler URL has the webaddress of the server followed by '/Handler.ashx' (which is the handler file) but i'm getting different errors.
Also to make this a bit more interesting, today I correctly received an IPN from Paypal to one of the same hosting server webaddress, with a 'transaction_subject : PayPal money request from xxxxxxxx' which was received and processed by my existing IPN handler (not the sample one from Paypal) and returned the correct info. to receive 'IPN Response: VERIFIED DateTime: 27-08-2013 19:05' so this got through and worked fine.
So in conclusion, I wonder if Paypal have either changed something and not informed the community or have an issue with their IPN simulator / CART IPN. If anyone can help or if a Paypal support engineer would like to work with me to try out some code, etc, please get back to me as I will keep trying to solve this but to be honest I see not what else I can do from my end as I've seen working IPN and a non working IPN simulator.
As extra info. here is an IPN Message as from my sandbox seller test account, that can't get through to my IPN handler on one of the same hosting servers (returns error 500) yet this used to get through and nothing has changed.
'mc_gross=2.75&protection_eligibility=Ineligible&address_status=confirmed&item_number1=BabyGrow2&payer_id=KHJGBQZNAFB7L&tax=0.00&address_street=1 Main St&payment_date=14:34:07 Aug 27, 2013 PDT&payment_status=Pending&charset=windows-1252&address_zip=95131&mc_shipping=0.00&mc_handling=0.00&first_name=Test&mc_fee=0.28&address_country_code=US&address_name=Test Buyer&notify_version=3.7&custom=1csi4t45gy4gkz45r5r4t0ey&payer_status=verified&business=wow####gmail.com&address_country=United States&num_cart_items=1&mc_handling1=0.00&address_city=San Jose&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31A1fBAmiE5lcDRsQKQNaqoyQI7ucQ&payer_email=wow#######gmail.com&mc_shipping1=0.00&tax1=0.00&txn_id=8SG98957G0030294Y&payment_type=instant&last_name=Buyer&address_state=CA&item_name1=Baby Grow Age 0 - 1&receiver_email=wow#########gmail.com&payment_fee=&quantity1=1&receiver_id=8QRMB3QFHCL56&pending_reason=paymentreview&txn_type=cart&mc_gross_1=2.75&mc_currency=GBP&residence_country=US&test_ipn=1&transaction_subject=1csi4t45gy4gkz45r5r4t0ey&payment_gross=&ipn_track_id=7b4507c8c4313'
Still hoping we can resolve this soon.
Many Thanks.
Trev.
Asp.net / C# / HTML / CSS3

Every alternate Paypal IPN transaction is failing (HTTP code 400)

I have a weird issue with Paypal IPN. Every alternate transaction is failing. So let's say if first transactions goes well then second one fails. Similarly if 3rd one goes well then 4th one fails.
HTTP status code I am getting for failed transactions in IPN history is 400.
I have implemented the new Paypal host header changes that were newly introduced by them.
Any idea why this is happening?
IPN History
http://i.imgur.com/NfqRsGi.png
IPN Detail
http://i.imgur.com/hcKdasw.png
EDIT
I am using PHP with curl to do IPN work (using same sample code as available on Paypal website)
ANOTHER EDIT
Ok I found another code sample for PHP 5.2 from Paypal site. This one is slightly different than the one I am currently using. I tested it on Paypal Sandbox twice and it worked. Later on I will test it on live to see if it is working fine or not.
Error 400 = bad request, this means that the get requests being made on the application layer (by your browser) may contain errors or the transport layer (syn, syn, ack, syn) 3 way hand shack is being interrupted. I would check your PC for Mallware to be on the safe side. Do a netstat -b in dos and see what's trying to get connections to the external network.
Also do a scan with malware bytes and a good virus scanner like Eset nod32.. Let us know how you get on^^
The new script I downloaded from Paypal website fixed the issue.

Paypal Sandbox IPN error

After paypal updated their interface (sandbox.paypal.com for example is not working, now you have to go to developer.paypal.com) many of the things are not working: 2 of them are particularly frustrating and I was hoping someone here knew how to get around them:
Am I the only one whose sandbox customer test accounts are not able to make purchases? The transaction page says they are not available.
IPN validation is not letting me send a https request. When I do it says there is something wrong with the server name. Yesterday however before the update I could get verified status. If I dont put https, now my handler gives me an invalid responde status, code: 400. What does it mean?
To fix the HTTP 400 error, follow the instructions in https://www.x.com/content/bulletin-ipn-and-pdt-scripts-and-http-1-1 and update your code to pass "Host" information. Ideally, things should work with just the recommended changes from the above link. Apparently, thats not the case. Here is a fix from one of the PayPal MTS person - PalPAL sandbox IPN processor rejecting all messages?
Remove the "cmd=notify-validate" option from the validation URL. I tried this and it worked. Though it doesn't return the right string, atleast it doesnt break with the 400 error.
While we wait for a fix from Paypal, I wonder how a company like PayPal can cause such a huge blunder and not post anything on their status page - https://www.x.com/developers/paypal/documentation-tools/site-status/pp-cri. It just makes you think that even smaller companies can do a better job than companies like PayPal.
For the code:400 issue, you have to update the post to version 1.1. That information is located here.
https://www.x.com/content/bulletin-ipn-and-pdt-scripts-and-http-1-1 in this bulletin.
However, as I posted before the asp.net example uses a call, that does not exist, so I was only able to get mine partly working. After fixing this, the servers appear to be rejecting calls to https, or the cert they have installed is invalid.
Action Required before February 1, 2013
Merchants need to update their IPN and/or PDT scripts to use HTTP 1.1, and include the “Host” header in the IPN postback script. In addition to this bulletin, these merchants will be notified via a direct email.
Alright, seems to be fixed!
If you are having trouble logging in, like suggested above, clear cache and cookies and try again.
Regarding the error 400, seems to have been solved by paypal!

PayPal IPN testing

I'm trying to get this PayPal IPN tutorial to work:
http://net.tutsplus.com/tutorials/php/using-paypals-instant-payment-notification-with-php
I setup everthing and now I'm in the PayPal sandbox and sending with the "Instant Payment Notification (IPN) simulator" a message to my "ipn.php" and nothing happends.
The databse is still empty and I don't get a notification email.
I'm totally stuck with this. What can I do to find the error?
Thanks
Michael
Make sure your listener is on port 80. It is undocumented, but the paypal IPN simulator will fail to send to any other port.
The tutorial URL does not open for me, I get a "No input file specified.".
My first suggestion would be to open the PHP script that processes the PayPal IPN and write the following in the beginning:
file_put_contents('dump.txt', print_r($_POST, true));
Ensure you have write permissions in the directory that holds the script because "dump.txt" file will be created there. This way you can see what PayPal sends to you and give you a starting debugging point.
Also check your web server error log for PHP errors that might be happening to you. The tutorials are often written long time ago, on different systems, different PHP version, etc.
Edit: Also you probably already know this but the IPN processing script should be publicly accessible, not some localhost stuff.