Paypal NOTIFICATION_REFUSED_NO_CONNECTION

  • Posts: 38
  • Thank you received: 0
12 years 4 months ago #30618

Hello,

The shop process seems to be ok but when somebody make payment through Paypal, Admin receive a lot of emails that says:
"Hello, A Paypal notification was refused because the connection to the confirmation server failed."

A lot of emails means around 10 emails in 5 minutes and more than 20 while a day.

The shop and the payment are done but admin receive all these emails.

One idea to solve it?
I use Hikashop Business.

Thanks for your support.

Last edit: 12 years 4 months ago by chocovo.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 4 months ago #30666

Hi,

When your server receives a notification it needs first to confirm whether this notification comes from your payment gateway or not because it is always possible that a valid IP address has been injected and that someone else is tried to validate an order. So there is a mechanism in place to contact a paypal server HikaShop knows as being an official paypal server to confirm that it comes from paypal. If this connection fails, that means that either your hosting company is blocking outgoing connections from your server or you don't have the openssl option activated in your PHP configuration or that the paypal servers are down, the later being a lot less likely. So you should check that you website is able to make outgoing connections and that the SSL is activated. Also, we advise you to contact your hosting provider to ask them about their policies on outgoing connections. If they are not blocking them, then you might want to contact us via our forum as we might need to adapt our plugin to a change from paypal.


www.hikashop.com/en/support/documentatio...rror.html#connection

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
12 years 3 months ago #31133

I am having precisely this problem. I checked with my hosting company:

1. Can I make outgoing connections?


Yes, you can. You'll need to make sure that that the proper IP address of
your server (XXXXXXXXXX) is whitelisted so they accept your
connections.


2. is "the open ssl option activated in the PHP configuration?" Is that the case with my current site?

Yes, SSL with PHP is active on our servers.


I feel that the first answer was definitive but don't know if PayPal whitelists IP addresses. The second answer is more vague but I'm stuck (not having background in PHP, etc....)

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 months ago #31161

From what your hosting company says, it should be working.
Maybe you have some kind of security component installed which blocks outgoing connections ?

I don't see anything else which could do that. Most of the time, the problem comes from the hosting blocking outgoing connections.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
12 years 3 months ago #31165

I don't have any security type components, modules or plugins. Unless there is some global configuration or Hikashop system setting that is causing this issue, I don't know what it could be.

My Joomla mail settings are:

Mailer: PHP mail function
Sendmail path: usr/sbin/sendmail

System emails (new user registration, notifications of comments on articles, etc....) have all been working fine.

Last edit: 12 years 3 months ago by JRH.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 months ago #31205

Emails are not related to that problem.
The sending of emails is done within your server, it's not sent by PHP directly so HTTP outgoing connections restrictions do not apply to emails sending.

I'm afraid I can't help more than what I already told you. If the connection is refused, it's becuse something is blocking the connections, and most likely it's between your server and paypal that it is happening (and in most cases, that would be the hosting company) or something on your server.

You could try to activate the debug mode of the paypal plugin and then get the payment log (once you get again such email) in the Files tab of the config. That might give an error message with more information. You could then send that log to your hosting company.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
12 years 3 months ago #31304

Thanks again for the follow up. I've pressed my hosting company further and this is their question:

You will need to ask the developer what port number the application is attempting to communicate open. We do not open non-standard ports on shared hosting machine such as the one you are on.

Please let me know.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 months ago #31321

The communication is of course on port 443 (HTTP SSL) to the paypal.com servers. It's a standard port for web communications.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
12 years 3 months ago #31367

This is the communication that I received from my hosting company:

Port 443 is a standard port and is open on our servers. There is nothing
on our servers or network that would prevent communication using on this
port.


Now with that being the case and based on previous posts to this thread, it seems like there are not only no solutions, but no more ideas as to what the problem can be. Either one of two things have to happen at this point:

I disable the authentication feature with paypals servers (not good)

or

I can't use Hikashop (I can't receive 15-20 failed connection attempt emails per day per order).

This issue is the last functionality problem before my store can go live and also the only thing holding me back before I step up to Hikashop Business. I want to make sure all of the basic configurations are correct and the component is fully operable as a free version before I invest. But up till now, it's been a wonderfully smooth program.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 months ago #31371

There is a simple solution. Use another hosting which won't block outgoing connections.
That error only happens when the server is setup to not allow connections to the outside or if open ssl is not installed.
Unfortunately, you will have the same problem with all the other ecommerce solutions out there are they all use that outgoing connection to paypal to verify the payment notifications.
Or you can remove the check to the paypal server. The security will be lower but that would avoid the problem...
You can do that by removing the big chunck of code which handles the connection to paypal in the function onPaymentNotification of the file plugins/hikashoppayment/paypal.php

If you just want to not receive these emails, you can just turn off the option "allow payment notifications from paypal" in the paypal plugin.

Last edit: 12 years 3 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
12 years 3 months ago #31734

Ok, thanks again. I think that at this point the easiest thing to do would be to remove the IPN check and take my chances... my average retail price is very low anyway. The chunk of code to remove, can you please let me know that first line of code and the last so that I don't delete vital info.? I at least want the hikashop program to update when paypal customers make a payment--esp. in regards to downloads. Thanks!

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 months ago #31736

You can edit the file plugins/hikashoppayment/paypal.php and remove the code from the line (included):
$fp = fsockopen ( $url, $url, $errno, $errstr, 30);

until the line (not included):
$completed = preg_match("#Completed#i", $vars);

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
12 years 3 months ago #32174

Thanks for your assistance. I have removed the PHP to disallow the IPN check with PayPal's servers. Everything works smoothly now except the component does not update to "confirmed" when the PayPal payment is made. I receive the following email from PayPal:

Hello,
A Paypal notification was received with the status Completed. The order status was not changed.

The "allow notifications" in the plugin is set to yes. Is there anything that I can do to make the Hikashop component update its system to "confirmed" so that digital downloads are available as soon as the payment is completed?

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 months ago #32190

PLease make sure that you didn't remove the line:
$completed = preg_match("#Completed#i", $vars);

Please Log in or Create an account to join the conversation.

  • Posts: 1
  • Thank you received: 0
6 years 7 months ago #275797

Hi Nicolas,

I see this is a very old thread but I'm having the same problem that's only just occurred in the last week, the Hikashop has been working happily for over a year but all of sudden the orders are all coming back with "Paypal payment notification refused: Connection to Paypal failed for the order XXXX".

Similar to the thread, the end user experience is normal and all goes through but the order doesn't get switched to Confirmed at the end and these notifications start coming through and you get ~10-20 per order.

I've been checking with my host company to see if anything changed and they pulled up the firewall logs etc. and have found nothing is blocking the outbound connections and they have noticed that the rejections only started a few days ago on the 9th of August and they can see that what's being recorded back is a 403 forbidden status for the ipn calls.

Here was one that was fine on the 1st August

173.0.81.1 - - [01/Aug/2017:12:30:13 +0100] "POST /index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=paypal&tmpl=component&lang=en&Itemid=865 HTTP/1.1" 200 - "-" "PayPal IPN ( www.paypal.com/ipn )"

And then they are seeing this now on calls with a 403 status.

173.0.81.1 - - [09/Aug/2017:18:42:17 +0100] "POST /index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=paypal&tmpl=component&lang=en&Itemid=905 HTTP/1.1" 403 2088 "-" "PayPal IPN ( www.paypal.com/ipn )"

I've updated to the latest version of Joomla 3.7.4 and HikaShop 3.1.1 to make sure it was a version problem but on repeating an order this is still happening and getting loads of these alerts through.

>>>
Paypal payment notification refused: Connection to Paypal failed for the order XXXX

Hello,
A Paypal notification was refused because the connection to the confirmation server failed.

Check the documentation concerning this issue at www.hikashop.com/index.php?option=com_up...pal-error#connection
This notification was for the order XXXX on the website www.websitename.com
You can access the order details directly by clicking on the link below after logging in your back end:
www.websitename.com/administrator/index....sk=edit&order_id=224
>>>

I noticed in the thread the proposed method of taking out a chunk of code from the paypal.php file won't work now as the source code has changed significantly and the two lines of code mentioned are in very different places in the file.

Any ideas? Other than turning off the "Allow payment notifications from PayPal Payment" - by the way with this option, turning it off, what other alerts are disabled? I assume the seller and buyer still get all the same transactional emails and notifications? But I understand this isn't going to fix the other problem that the order isn't getting updated from Created to Confirmed...

Any help greatly appreciated - many thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
6 years 7 months ago #275843

Hello,

Indeed that is a very (veryyyy) old thread.

I don't have the impression that you have followed what is written in our documentation:
www.hikashop.com/support/documentation/1...rror.html#connection

(which is exactly the text that Nicolas quoted in the first response in that thread
www.hikashop.com/forum/3-bug-report/3061...onnection.html#30666 )

So, please read and follow the instructions and if you can't solve the issue with your hosting blocking the external communications ; I invite you to perform search in our forum for more recent topics (less than one year) and, if you really can't find something which would help you, create a new thread.
But I'm afraid that an almost 6 years old thread cannot help you.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.110 seconds
Powered by Kunena Forum