Hi,
The code modification Nicolas proposed is in no way a backdoor.
All a hacker would be able to do with it is confirmed the orders of your website even without making a payment.
Even in that case, the hacker should fake a Paypal IP when sending his fake notification ; It's not something common and the hacker must know that you deactivated the paypal confirmation... Even if I understand a part of the message of Yavor, it does not have such kind of security breach.
And if you don't want that risk and don't want to have your hosting company add extra rules to allow your server to connect to PayPal, then, you can simply turn off the "allow payment notifications from PayPal". And you'll have to manually confirm the orders yourself.
As Nicolas said previously, the issue is not in HikaShop.
There is no programming trick to be able to contact an external server if your hosting company blocks connections to external servers.
You're basically asking us if there is a way to open a locked door using only a key without having any keys. And that's not possible. The solution is to have the key (have your hosting company allow for external connections to PayPal).
The PHP version is not linked to the problem. HikaShop does the exact same thing regardless of the PHP version. The difference here, from what we understood of your message, is that the rules that your hosting company set worked only for your previous version of PHP, not the new one. So again, that's nothing we can change on our end.
Is it also possible to have the full rewriting of this part of the PayPal plugin given here? (The given lines).
No, that won't be possible because the goal of the payment notification with Paypal is to contact Paypal in order to confirm the transaction ; if your server does not allow to make a connection with paypal ; you have to deactivate the payment notifications and confirmed the order manually.
Even if Nicolas gave you a patch to perform half of the job ; Paypal will continue to send notification until he got a confirmation from your server (thing it will never have in your case) ; So I can't provide a half-working plugin.
You can modify the plugin if you want in order to remove some checks in the plugin, but regarding the restriction of your web hosting, we are not able to provide you a rewritten plugin which will feet to that.
The current plugin can work with that statement, as long as you do not use the payment notifications with Paypal.
Once again, In that current case, the issue is not related to HikaShop but to your hosting.
If your hosting can't provide you the feature to validate a paypal order ; you won't validate paypal orders and you will have to do it manually.
Nicolas tried to propose you something to help you but we won't be able to do more than that ; because that's not the way that paypal is working and the problem is not coming from our plugin or implementation.
Regards,