Paypal ERROR checkPaypalIps: Error with REMOTE IP ADDRESS

Started by tantedante, October 16, 2015, 02:55:58 AM

Previous topic - Next topic

Milbo

Quote from: GJC Web Design on October 17, 2015, 10:39:35 AM
chked 3.0.10 and the code is the same as Stan describes - will fail on 2 or more ips - all it is doing is detecting the comma and checking the ip individually

As far as I know this is fixed in vm3.0.12
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rjcroasdale

hello :)
stAns fix doesnt seem to work for me, switchd out the checkIP function in helper with stAns but still problem. Also switch out with 3.0.12's version, sorry didn't upgrade the whole thing yet ;)

I get ERROR checkPaypalIps: Error with REMOTE IP ADDRESS = .

.?  :o

Does any of you knows what will fix this problem so I can fix whilst waiting for maintenance session VM to 3.0.12 please?

thank you  :D 8)

GJC Web Design

is the error listing an ip address or a comma separated list of?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rjcroasdale

Hi GJC, the error is with a .

"checkPaypalIps: Error with REMOTE IP ADDRESS = ."

GJC Web Design

and are orders not confirming or is this just a random error?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rjcroasdale

#20
yes, along with this error, that's the problem, the orders stay pending...
...and after each paypal order / payment the "error with payment method" email is sent to me and vendor.


2016-01-26 06:06:57 DEBUG checkPaypalIps REMOTE ADDRESS:
2016-01-26 06:06:57 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


also finding this php warning in httpd error log with paypal referer
PHP Warning:  syntax error, unexpected $end, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in vmsafe/keys/id.ini on line 8 in /administrator/components/com_virtuemart/helpers/vmcrypt.php on line 102, referer: https://www.paypal.com/cgi-bin/webscr?cmd=_flow&SESSION=XHe6blahblah

rjcroasdale

#21
Hello peeps :)

gethostbynamel returns an array, individually checking www.paypal.com I get "Akamai International" but checking notify.paypal.com I do get a valid IP from the list... I'm still stuck up in here


php > echo gethostbyname('www.paypal.com');
104.83.1.168

php > echo gethostbyname('notify.paypal.com');
173.0.81.1


I have checked and compared code from my site and 3.0.12 but cant find anything related that may have been changed. I am now going to look for a change log, if I fail to find one.... is there a change log somewhere you could point me to please?

I found this Topic: Please test our new vm3.0.11.2 http://forum.virtuemart.net/index.php?topic=131898.0 Which I think is what I'm looking for, but cant find mention of Paypal CheckIPs update here - Anyone point me right please?

Thank you for reading bros  :D

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rjcroasdale

#23
lu! thanks milbo :) I dont use a reverse proxy, I assumed it was Paypal using service to help servers, like cloudflare dos protection etc. Anyway - I stepped over that by adding manually IP address in the list for www.paypal.com to hosts to test. Still the same problem although now is resolving both www. and notify. to IP's that are in the list

php > echo gethostbyname('www.paypal.com');
173.0.88.66
php > echo gethostbyname('notify.paypal.com');
173.0.81.1


still getting error, thunk that would have at least patched my issue for now but seems something else

2016-02-08 05:24:41 DEBUG checkPaypalIps REMOTE ADDRESS:
2016-02-08 05:24:41 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

            These are the valid IP Addresses: 173.0.88.66,173.0.81.33,173.0.81.1,216.113.188.202,216.113.188.203,216.113.188.204,66.211.170.66,173.0.88.66,173.0.88.98,173.0.84.66,173.0.84.98,173.0.80.00,173.0.80.01,173.0.80.02,173.0.80.03,173.0.80.04,173.0.80.05,173.0.80.06,173.0.80.07,173.0.80.08,173.0.80.09,173.0.80.10,173.0.80.11,173.0.80.12,173.0.80.13,173.0.80.14,173.0.80.15,173.0.80.16,173.0.80.17,173.0.80.18,173.0.80.19,173.0.80.20,173.0.82.126,173.0.88.67,173.0.88.99,173.0.84.99,173.0.84.67,173.0.88.69,173.0.88.101,173.0.84.69,173.0.84.101,173.0.88.68,173.0.88.100,173.0.84.68,173.0.84.100,173.0.81.1,173.0.81.33,64.4.240.0,64.4.240.1,64.4.240.2,64.4.240.3,64.4.240.4,64.4.240.5,64.4.240.6,64.4.240.7,64.4.240.8,64.4.240.9,64.4.240.10,64.4.240.11,64.4.240.12,64.4.240.13,64.4.240.14,64.4.240.15,64.4.240.16,64.4.240.17,64.4.240.18,64.4.240.19,64.4.240.20,118.214.15.186,118.215.103.186,118.215.119.186,118.215.127.186,118.215.15.186,118.215.151.186,118.215.159.186,118.215.167.186,118.215.199.186,118.215.207.186,118.215.215.186,118.215.231.186,118.215.255.186,118.215.39.186,118.215.63.186,118.215.7.186,118.215.79.186,118.215.87.186,118.215.95.186,202.43.63.186,69.192.31.186,72.247.111.186,88.221.43.186,92.122.143.186,92.123.151.186,92.123.159.186,92.123.163.186,92.123.167.186,92.123.179.186,92.123.183.186The Order ID received was:

         
I really might just see if I can bypass this function, you think I could do that? So the orders will get set to confirmed somewhere? ... pending orders, with no email to customer or vendor is starting to become a issue :( :D

Thank you for reading

rjcroasdale

#24
Hello there peeps :)

I am not sure what this was in the end, after upgrading PHP and Apache the problem went away. Thank you.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

h20melon

I was running version 3.0.14 and was getting this error.  Have just upgraded to 3.0.16 and still the same error message:

2016-04-14 06:54:19 ERROR checkPaypalIps: Error with REMOTE IP ADDRESS = 173.0.81.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: The Order ID received was: 1Y6P050

It doesn't specify the valid IP Addresses in the log file.

I did a ping on 173.0.81.1 and I get no response.

Any suggestions?

Thanks

GJC Web Design

it is Paypal

NetRange:       173.0.80.0 - 173.0.95.255
CIDR:           173.0.80.0/20
NetName:        PAYPAL-SITE
NetHandle:      NET-173-0-80-0-1
Parent:         NET173 (NET-173-0-0-0-0)
NetType:        Direct Assignment
OriginAS:       AS17012
Organization:   PayPal, Inc. (PAYPAL)

but the line->

These are the valid IP Addresses:

should say

These are the valid IP Addresses: 104.108.64.175,173.0.81.33,173.0.81.1,216.113.188.202,216.113.188.203,216.113.188.204,66.211.170.66,173.0.88.66,173.0.88.98,173.0.84.66,173.0.84.98,173.0.80.00,173.0.80.01,173.0.80.02,173.0.80.03,173.0.80.04,173.0.80.05,173.0.80.06,173.0.80.07,173.0.80.08,173.0.80.09,173.0.80.10,173.0.80.11,173.0.80.12,173.0.80.13,173.0.80.14,173.0.80.15,173.0.80.16,173.0.80.17,173.0.80.18,173.0.80.19,173.0.80.20,173.0.82.126,173.0.88.67,173.0.88.99,173.0.84.99,173.0.84.67,173.0.88.69,173.0.88.101,173.0.84.69,173.0.84.101,173.0.88.68,173.0.88.100,173.0.84.68,173.0.84.100,173.0.81.1,173.0.81.33,64.4.240.0,64.4.240.1,64.4.240.2,64.4.240.3,64.4.240.4,64.4.240.5,64.4.240.6,64.4.240.7,64.4.240.8,64.4.240.9,64.4.240.10,64.4.240.11,64.4.240.12,64.4.240.13,64.4.240.14,64.4.240.15,64.4.240.16,64.4.240.17,64.4.240.18,64.4.240.19,64.4.240.20,118.214.15.186,118.215.103.186,118.215.119.186,118.215.127.186,118.215.15.186,118.215.151.186,118.215.159.186,118.215.167.186,118.215.199.186,118.215.207.186,118.215.215.186,118.215.231.186,118.215.255.186,118.215.39.186,118.215.63.186,118.215.7.186,118.215.79.186,118.215.87.186,118.215.95.186,202.43.63.186,69.192.31.186,72.247.111.186,88.221.43.186,92.122.143.186,92.123.151.186,92.123.159.186,92.123.163.186,92.123.167.186,92.123.179.186,92.123.183.186

from plugins\vmpayment\paypal\paypal\helpers\paypal.php  ~ line 533

var $paypal_iplist
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

h20melon

Thanks for the reply GJC Web Design.

I have looked at that file and have attached it.  The IP address is in the file, as with lots of other IP addresses.  But I'm not sure what I'm looking at to fix it. 

It's strange that without changing anything, it stopped working and I hoped the update would have fixed it but didn't (guess it didn't update that file).

Thanks


GJC Web Design

have just completed a J3.5.1/VM3.0.16 and Paypal for me is working fine

you need to set up a1 cent test product and get testing.. no one else is reporting a problem.. so u need to debug this
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation