I've noticed the following behaviour from the Sandbox over the past few days. When I POST back a received IPN (to acknowledge the IPN per the PayPal IPN protocol), PayPal is responding with an empty message body instead of the body containing "VERIFIED" or "INVALID". My code was previously working fine and has not changed for quite some time. Is anyone else observing this behaviour?
Related
I have implemented an IPN listener in VBScript/Classic ASP.
From my side, it seems to work perfectly.
When it is called, it sends the message back to Paypal appending cmd=_notify-validate. It then checks the response for objHttp.status = 200 and objHttp.responseText = "VERIFIED" then adds the order to my database.
However Paypal are sending me emails;
Subject: PayPal Instant Payment Notification Warning
Instant Payment Notifications sent to the following URL(s) are failing:
According to IPN Testing
Every listener must include code that handles the "error notification" IPN messages.
Either way you should follow the steps in the IPN troubleshooting tips step by step.
Here is a few I've picked out that should help.
Check the URLs listed in your IPN history to ensure that PayPal is posting each IPN to your listener.
Check your web server's access and error logs.
Check your programming language's error log.
Verify that your IPN listener is responding to all messages, even those you do not intend to process.
Further to the OPs comments
the code samples Paypal give, in which this step isn't performed. Is this step required?
it sounds like you are missing Step 2 from the workflow in the documentation
2. After receiving the IPN message from PayPal, your listener returns an empty HTTP 200 response to PayPal. Otherwise, PayPal resends the IPN message.
Judging by the PHP sample as well both seem to send the verification first, which doesn't tally with the workflow suggested by the documentation.
In which case you should just be able to do
Response.Status = "200 OK"
after the rest of the code, make sure nothing else is written back using Response.Write() so the server response is blank, you could even use
Call Response.Clear()
before setting the Response.Status to make sure nothing else has been written from the Response buffer. This will only work however if Response.Buffer has been set to True beforehand (usually at the beginning of the script).
I've built a listener to capture PayPal transactions using IPN into Salesforce. However, it's only receiving a small percentage of our PayPal transactions.
I've determined that they're not always being sent by:
I manually send (url-hack) a never before seen IPN string on the listener page. It processes immediately and perfectly.
I go to PayPal and instruct the site to resubmit the same IPN
Since it's a known transaction my system will send an error message. I've verified this
by repeating step 1.
The message that should be produced by step 2 never arrives. The other IPNs that were also resubmitted during step 2 also never appeared in Salesforce.
Your insights are greatly appreciated as this is amazingly frustrating!
Steve
Addendum
Based on advice in a comment from #Andrew Angell below, here's more information...
All of the IPN histories look like the following. Notice the Notification URL. Could my problem be that it doesn't contain my listener page or even match my IPN Notifier setting (which I just double checked)?
Also all of the transactions have a response code of 200 and zero retries.
We are requesting the following URL "https://securepayments.paypal.com/cgi-bin/acquiringweb" with cmd=_notify-validate to get the notification of VERIFIED or INVALID as per the documentation (https://www.paypal.com/cgi-bin/webscr?cmd=p/acc/ipn-info-outside), but we are receiving a completely different response. This causes problems because as a result our system doesn't behave as expected.
Response:
Error Processing Payment Error Message "This transaction can't be
processed. Please pay with another card."
Please help me why I am facing this issue however we are receiving payment successfully and everything was working fine a couple of days ago.
I have found a solution and to make it clear, https://www.paypal.com/cgi-bin/webscr URL is for IPNs and https://securepayments.paypal.com/cgi-bin/acquiringweb is for receiving payments through hosted sole solution(developer.paypal.com/webapps/developer/docs/classic/products/#HSS).
May be PayPal has changed something in their API.
We seem to be having an issue with a customer who has a cubecart store and Paypal IPN. The issue is that the IPN notification URL's were working and changing the order status upon a successful purchase, but now it seems to have stopped working. The orders go through ok and the item appears in the Paypal account, but it is not updating the order status on the store (goes from pending to processing automatically).
Check your IPN history in your account. First verify that the IPN is being sent out. If the IPN log shows the IPN being sent out, see if it is in a failed or retrying status. Also look at the details of the IPN message and see if it shows the status code that is being returned back from your site. The IPN system expects a 200ok response to be returned. If there is a different status code, this may help to determine the cause of the issue. Also, double check with your hosting provider if hosting with a 3rd party to make sure they haven't done any updates to firewalls or proxy's that may have affected your script.
PayPal is sending the VERIFIED message to my IPN listener but my IPN History shows a FAILED status. The IPN History also shows a 404 error. The code I am using for my listener can be found here: https://cms.paypal.com/cms_content/US/en_US/files/developer/IPN_PHP_41.txt. I am testing this with sandbox. How can I be receiving a VERIFIED response from Paypal but yet the IPN History shows a failed STATUS with a 404 error? Shouldn't PayPal be sending an INVALID response since the IPN History status is failed?
VERIFIED has nothing to do with how the transactions appear in your ipn history. How you respond to the original ipn post is what determines what shows in your ipn history.
If your ipn history says it's receiving a 404 response, then you need to check your ipn script and stop sending a 404 response.
If it were any other error, since you are using PayPal's script, I would bet you didn't change the environment variable/the URLs to match your environments. With a 404 though, you're telling the client (paypal in this case) that the page they want doesn't exist, even if you're still reading the data