Virtuemart – Paypal Error with REMOTE IP ADDRESS issue solved

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.

Add a Comment

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


My name is Nohman Habib and I am a web developer with over 10 years of experience, programming in Joomla, Wordpress, WHMCS, vTiger and Hybrid Apps. My plan to start is to share my experience and expertise with others. Here my basic area of focus is to post tutorials primarily on Joomla development, HTML5, CSS3 and PHP.

Nohman Habib


Request a Quote

PHP Code Snippets Powered By :