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.