Cubecart and Paypal IPN - paypal

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.

Related

Paypal IPN suddenly not responding

I have a site that offers services to paid members.
When a member subscribes, he goes to Paypal, pays the subscription and then Paypal calls my ipn script which takes care of updating the database and sending a message to the member.
Everything is working fine, but some time ago, I started receiving some messages from Paypal:
"Please check your server that handles PayPal Instant Payment Notifications (IPN).
IPNs sent to the following URL(s) are failing:
http://domain.com/ipnhandler.php
If you do not recognize this URL, you may be using a service provider that is
using IPN on your behalf. Please contact your service provider with the above
information. If this problem continues, IPNs may be disabled for your account."
I found it strange, because at the same time, people went on subscribing, and the database was updated everytime. So I found strange to receive a message from Paypal saying that the URL was failing... How could it be failing, while the script was working fine?!
Then, one day, the database stopped from being updated. It started in early december, and since then, people pay their subscription but nothing happens. I had a look at the ipn history in my Paypal account, and I can see that Paypal called the script once (only once) for each payment, but the script returned nothing (http response is empptty). And on my side, I had a look at my log file, and there's nothing in it.
In my ipn script, the first thing I do is logging the call in the log file. But it's desperatingly empty since december...
Is there anyone who could help me with this issue? It's very upsetting because I have to register eveything manually... And everything was working fine, so I don't understand why it's not wirking anymre as I didn't change anything in the script neither in Paypal setup.
Please, I really need your help!!!
Thanks
The IPN script will need to load completely in order to return a 200 OK response from your server back to PayPal. What tends to happen is you could have an error happening near the end of the script after everything else has run, so while it seems like the script completed because you see emails/database updates, etc, it actually did not complete successfully.
Any time I have something going wrong with my IPN stuff I follow the steps in this guide on testing PayPal IPN and I'm able to track down the problem. I would recommend you follow those steps to find your problem.

IPN doesn't seem to work the way it should based on PayPal's docs

We have created a small app to help users manage certain PayPal orders, but the IPN doesn't seem to work as expected. I found this at the note at the bottom of the following URL:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/
"Even though you have not enabled receiving IPN messages in your Profile or
you have reset your preference by turning off IPN messages, PayPal still
sends IPN messages to the notification URL you specify for a specific
payment."
Based on this we instructed our beta testers not to worry about enabling IPN in their account, since we specify the notification URL for the user's transaction via the notify_url field in the button code. But then no IPN is sent.
Next we instructed our beta testers to enable IPN, and since doing so requires you to enter a notification URL and users don't want transaction data for EVERY transaction posted to our system, and we don't want that either, we instructed them to enter a "fake" URL and disable sending messages to that URL in their account. Based on the note at the link above we figured this should work too, but it doesn't. No IPN is sent, although you can now see the message in the IPN history.
So I'm a little stumped here. The way I see it, we only have 2 options, and neither seems ideal ...
Instruct our users to enable IPN and hard-code our IPN notification URL into their profile settings. This means if they're already using IPN for something else they can't do this, and even if they can it means that data for EVERY transaction they do will hit our system and neither the user nor we want that.
Instruct our users to enter a "bogus" notification URL in their account, and leave messages to that URL enabled, since we'll override this with our own notify_url setting. This would work, however it will cause PayPal to attempt to send messages to an invalid notification URL for any transactions NOT processed through our system. I assume PayPal doesn't want this, and it could possibly lead to the user losing IPN access in the future due to constant IPN errors, etc.
Anyone have any ideas for me? Thanks!
In experience, as you're finding, you do need IPN enabled in order for the IPNs to be sent, but then if you specify notify_url it will override the URL in the profile.
Instead of setting up a bogus URL, though, you could put any actual script there. Just make it a script that does absolutely nothing. That way IPNs that get sent here will "do nothing" other than send a 200 OK back to PayPal's server showing that the IPN was received successfully.
If they're already using their own IPN solution and the data needs to go through both then you'll have to setup an IPN forwarder. You can daisy-chain IPN URLs to that a bunch of them get hit with the same data if you need to.
Personally, I like to have some sort of a catch-all IPN setup in my profile that saves any IPNs it gets to my database for logging purposes. Then, again, the notify URL can be used to override this if necessary.

Listener not receiving IPN messages

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.

Paypal IPN not working on another paypal account

We have this website that was running since September 2013 and relying on paypal IPN for user registration. However, this week we got a report from the client where 3 users was able to pay through paypal but was not registered into the site.
We temporary changed the paypal email('business' field) from the client's to another paypal account. Went through the process of registration and the IPN was successfully delivered. The user was created in the system, the IPN transaction was logged into our system. When we tried to changed it back to the client's paypal email account, but unfortunately the IPN did not reached through our system.
Here are some questions that I have in mind
Does the type of paypal account (ie. business or personal account) matter when sending and receiving IPNs? Could this be a possibility? (even though last year it was working perfectly fine with the client's paypal account)
We've been receiving this paypal email (below) for the past months. That email was appearing after a few months when we opened the site and we didn't even changed a single code from our IPN listener. Could this be the reason why the IPN was not sent when we use the client's paypal account? However, we always use the notify_url field since we have multiple IPN listeners.
>Please check your server that handles PayPal Instant Payment
>Notifications (IPN). IPNs sent to the following URL(s) are failing:
>
>http://<site>/payment/postback/
>
>If you do not recognize this URL, you may be using a service provider
>that is using IPN on your behalf. Please contact your service provider
>with the above information. If this problem continues, IPNs may be
>disabled for your account.
thanks,
Your IPN script is not completing successfully, so PayPal's server is not getting a 200 result back, which causes it to send repeat IPN's and will eventually disable itself as the message says.
Your web server logs should provide the info you need. Check there to see the history of the IPN script getting hit and you'll probably find some 500 results. Those should also provide the actual error that happened so you can get it resolved.
It's possible that some IPN's are working just fine but others are failing based on certain characters in payer information or other similar issues. You need to get all of that worked out in your IPN script so it can handle anything thrown at it.

PHP paypal sandbox

I am using paypal sandbox for my transactions but ipn is not working. When i check ipn history in my sandbox account it often shows the status as "Retrying". Sometimes it show the status as "Failed".
When i try to resend the ipn again from the account it is successfully sent.
Can any one guide me in understanding why it sometimes fails and what the reason(s) could be?...
No, we can't.
When it's 'Retrying' it means it did not get a proper HTTP/1.1 200 OK response from your script.
Most likely, this means it errorred out when attempting to POST data to it.
If you click on the 'Message ID' in the IPN history, you can view the HTTP status it encountered when accessing the script.
Once you've narrowed it down to a specific HTTP error code, you'd want to review your webserver access and error logs to find the cause of the error.
Thanks for your response.
My problem has been resolved. The return url was incorrect, and that's why ipn was not working.
My return url was correct in the paypal account and that is why ipn was working from the account.