Hi
I am using VM version 2.6.12.2.
When performing dry runs with paypal in sandbox mode I get an email warning that paypal's IP is not in the preapproved list.
2014-11-27 19:31:25 ERROR checkPaypalIps: Error with REMOTE IP ADDRESS = 173.0.82.126, 127.0.0.1.
The remote address of the script posting to this notify script does not match a valid PayPal IP address
These are the valid IP Addresses: 173.0.82.126 The Order ID received was: xxxxxxx
As you see, the reported source ip is an array! Otherwise it is clearly the correct source IP for paypals sandbox service.
How can the source IP be an array?
Doesn't anyone have any input to this?
This is the function that supposedly gets the remote IP, and apparently returns an Array.
/**
* Get IP address in enviroment with reverse proxy (squid, ngnix, varnish,....)
* @return mixed
*/
function getRemoteIPAddress() {
if (!empty($_SERVER['HTTP_CLIENT_IP'])) { //check ip from share internet
$IP=$_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy
$IP=$_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$IP=$_SERVER['REMOTE_ADDR'];
}
return $IP;
}
It's from the paypal.php file in plugins/vmpayment/paypal/paypal/helpers