Author Topic: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9  (Read 12235 times)

stinga

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 872
    • Squangle ltd
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #15 on: September 09, 2013, 16:44:15 pm »
Ah, that will be why then!

Must get around to making the change then.
Just had an interesting problem where two order where placed at the same time (probably a double click issue) and ended up with the wrong order being changed from pending to  confirmed.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 841
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.6
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #16 on: October 12, 2013, 18:09:08 pm »
Hello Hutson

I have seen that PayPal has published a new list of IP-adresses to be checked.

I have changed line 224 in the notify.php with the extended list. There are probably some duplicates made by the redundant iplist and iplist1 calls to gethostbyname.

Change  line 224:
Code: [Select]
$paypal_iplist = array_merge( $paypal_iplist, $paypal_iplist2, $paypal_iplist3 );
With:
Code: [Select]
      // Added JH 2013-10-12
//Current IP addresses
//------------api.paypal.com---------
$paypal_iplist_api = array( '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');
//------------api-aa.paypal.com------------
$paypal_iplist_api_aa = array( '173.0.88.67','173.0.88.99','173.0.84.99','173.0.84.67');
//'------------api-3t.paypal.com------------'
$paypal_iplist_api_3t_aa = array('173.0.88.69','173.0.88.101','173.0.84.69','173.0.84.101');
//------------api-aa-3t.paypal.com------------
$paypal_iplist_api_aa_3t = array('173.0.88.68','173.0.88.100','173.0.84.68','173.0.84.100');
//------------notify.paypal.com (IPN delivery)------------
$paypal_iplist_notify = array('173.0.81.1','173.0.81.33');
//'-----------reports.paypal.com-----------'
$paypal_iplist_reports = array('66.211.168.93',
'173.0.84.161','173.0.84.198','173.0.88.161','173.0.88.198');
//'------------www.paypal.com------------'
//'Starting September 12, 2012 www.paypal.com will start resolving to a dynamic list of IP addresses and as such should not be whitelisted.'
//'For more information on IPNs please go here.'
//'------------ipnpb.paypal.com------------'
$paypal_iplist_ipnb = array('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');
// JH

$paypal_iplist = array_merge( $paypal_iplist, $paypal_iplist2, $paypal_iplist3,
// Added JH 2013-10-12
$paypal_iplist_api,
$paypal_iplist_api_aa,
$paypal_iplist_api_3t_aa,
$paypal_iplist_api_aa_3t,
$paypal_iplist_notify,
$paypal_iplist_ipnb
// JH
);

I think this will remedy the fraud reports :)
What Do You think ?

regards

Jörgen @ Kreativ Fotografi

[edit] Added two ' and removed the first line of code (Thank You Hutson)

Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2520
  • VirtueMart Version: 3.0.19.8
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #17 on: October 12, 2013, 18:57:43 pm »
Jorgen

We were not getting an issue with the gethostbyname1

Your solution could help those that are and I will adopt after I have tested it (although I guess this would need to go into live production for some time before any IP fault might occur.)

For those of you have this issue now, you can replace the code as jorgen suggests with the block below.

However you missed a couple of characters out of the listing that gave me a code error, I have adjusted accordingly

Code: [Select]
        $paypal_iplist3 = array( '216.113.188.202' , '216.113.188.203' , '216.113.188.204' , '66.211.170.66' );
// Added JH 2013-10-12
//Current IP addresses
//------------api.paypal.com---------
$paypal_iplist_api = array( '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');
//------------api-aa.paypal.com------------
$paypal_iplist_api_aa = array( '173.0.88.67','173.0.88.99','173.0.84.99','173.0.84.67');
//'------------api-3t.paypal.com------------'
$paypal_iplist_api_3t_aa = array('173.0.88.69','173.0.88.101','173.0.84.69','173.0.84.101');
//------------api-aa-3t.paypal.com------------
$paypal_iplist_api_aa_3t = array('173.0.88.68','173.0.88.100','173.0.84.68','173.0.84.100');
//------------notify.paypal.com (IPN delivery)------------
$paypal_iplist_notify = array('173.0.81.1','173.0.81.33');
//'-----------reports.paypal.com-----------'
$paypal_iplist_reports = array('66.211.168.93','173.0.84.161','173.0.84.198','173.0.88.161','173.0.88.198');
//'------------www.paypal.com------------'
//'Starting September 12, 2012 www.paypal.com will start resolving to a dynamic list of IP addresses and as such should not be whitelisted.'
//'For more information on IPNs please go here.'
//'------------ipnpb.paypal.com------------'
$paypal_iplist_ipnb = array('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');
// JH

$paypal_iplist = array_merge( $paypal_iplist, $paypal_iplist2, $paypal_iplist3,
// Added JH 2013-10-12
$paypal_iplist_api,
$paypal_iplist_api_aa,
$paypal_iplist_api_3t_aa,
$paypal_iplist_api_aa_3t,
$paypal_iplist_notify,
$paypal_iplist_ipnb
// JH
);




Thanks again for your diligence Jorgen ( I am geting closer to migrating VM1 to VM2 - months not years!)
regards
A

Joomla 3.6.5
php 7

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 841
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.6
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #18 on: October 12, 2013, 21:34:46 pm »
Hello Hutson,

Thanks for finding the typos, I have edited the original piece of code. It should be correct now. The first line doesn´t need to be included in the patch. This line is a duplication. Sorry about that. But it doesn´t cause any error if added to the patch.

I am also on the way of migrating my shop to VM 2. It will soon be what it should have been from the start, an easy task. But for now this extends my VM 1.1.3 until the migration is done  :)

The edited patch has been tested live a couple of minutes ago, seems to work.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 1999
    • alatak.net
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #19 on: October 15, 2013, 08:41:06 am »
Hello
Thank you very much for this. I will add the code.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2520
  • VirtueMart Version: 3.0.19.8
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #20 on: October 15, 2013, 10:14:24 am »
Patch to include new IP addresses

Tested and working in live by Me and Jorgen

Thanks Jorgen for the update, I am sure many people will benefit from this but will not respond. So a big thanks from them and me!!

[attachment cleanup by admin]
regards
A

Joomla 3.6.5
php 7

chetanmadaan

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 291
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #21 on: December 07, 2013, 00:40:26 am »
Patch to include new IP addresses

Tested and working in live by Me and Jorgen

Thanks Jorgen for the update, I am sure many people will benefit from this but will not respond. So a big thanks from them and me!!

Thanks, This worked well.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 841
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.6
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #22 on: December 07, 2013, 10:44:44 am »
Hello chetanmadaan

Nice to hear this. As until today i haven't received a single IPN error using this patch.  Glad to be of help. So it seems to have solved the issue.
Regards

Jörgen @ kreativ fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

baulamon

  • Beginner
  • *
  • Posts: 1
  • Skype Name: rajucb12
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #23 on: December 17, 2013, 09:14:02 am »
I just tried making the code changes above and I'm still having the same issue.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 841
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.6
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #24 on: December 17, 2013, 09:34:51 am »
What issue are you having and with which VM and Joomla version?
PLease share.

Regards

Jörgen @ kreativ fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

stinga

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 872
    • Squangle ltd
Re: Paypal IPN OCT 2013 http 1.1 fix vm 1.1.9
« Reply #25 on: December 18, 2013, 11:39:40 am »
Have you looked at the PP logs for IPN transactions? It might tell you what is going on.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4