Virtuemart – Paypal Error with REMOTE IP ADDRESS issue solved

Share this post on:

While using Virtuemart 3.x in a Joomla 3.x environment, you might get an email that there is an error with your PayPal payment. The content of the email is as below.

The paypal2.log.php file is placed in the administrator/logs folder of a typical Joomla installation. This file will yield the following error information.

ERROR checkPaypalIps: Error with REMOTE IP ADDRESS = .
The remote address of the script posting to this notify script does not match a valid PayPal IP address

Now what does it means? Why this error occurs and how to solve it?

Let me explain it to you in a bit detail and then I will tell you how did I solve this problem.

This issue occurs because the call to the PayPal server does not return all of the valid IP addresses. When this issue occurs, PayPal does not execute a valid IPN and thus the order which is marked as “Pending” before a payment still remains in the same state, even if the whole amount has been paid through PayPal.

Now coming to the solution, you might have gone through various Joomla and Virtuemart forums and have searched for the issue. I have also tried a lot of suggestions provided in the first place, but none of them actually worked and only one partially worked.

First Solution:

The first solution, in this regard, is to update the VM to the latest version of at least VM 3.6.8. The reason for this is that the updated version allows the web admin to manually put the PayPal IPs directly into the plugin. If PayPal is not directly giving the correct IP, this solution will work fine. These IPs are subject to change, so it is not a genuine solution, but as long as they remain the same, you can enjoy the fix.

The Second Method

This solution is meant to solve the issue by actually editing the files. It is not a very genuine solution, but it can fix the issue of not receiving proper order emails and order status updates. So, let us start implementing this.Open the file Root/plugins/vmpayment/paypal/paypal/helpers/paypal.php

Here, move to the processIPN function, as shown in the screenshot below. Comment out “return false” and instead put “return true” in this place. Now, what it will do is, it will still execute the script even if the remote IP is not found.

After making this edit, open the following file Root/administrator/components/com_virtuemart/plugins/vmpsplugin.php

Comment out the lines as shown in the screenshot below.

It will stop the script to send error emails.

These settings can remove the PayPal IP errors and you will be ready to receive order emails and can run your virtuemart based store with ease.

Important Note: Customizing core files in Joomla is not recommended, so only use this method of solving the PayPal remote IP address issue when you are in desperate need of receiving the PayPal order emails and no other solution is working for you at the moment. I, as a web developer and blogger, will not be responsible for any damage this may cause.

Author: Nohman Habib

I basically work in the CMS, like Joomla and WordPress and in framework like Laravel and have keen interest in developing mobile apps by utilizing hybrid technology. I also have experience working in AWS technology. In terms of CMS, I give Joomla the most value because I found it so much user freindly and my clients feel so much easy to manage their project in it.

View all posts by Nohman Habib >

Leave a Reply

Your email address will not be published. Required fields are marked *

PHP Code Snippets Powered By : XYZScripts.com