VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: optmax on February 28, 2015, 14:20:00 PM

Title: PayPal IPN fails in v2.6.16
Post by: optmax on February 28, 2015, 14:20:00 PM
VM 2.6.16
J! 2.5.27
PHP 5.4.25

Since updating to VM 2.6.16 (Component and AIO) PayPal IPN has been failing - the order statuses have not been updated.

On the PayPal IPN Order History the response codes are logged as 500.

I reinstalled VM 2.6.14 and the automatic retries from PayPal IPN are slowly drifting in and the order statuses are updated as expected (HTTP response code 200 logged at PayPal).

Have I missed a new configuration setting or something?

Anyone else having this problem?

Are there any logs I can check?

Title: Re: PayPal IPN fails in v2.6.16
Post by: GJC Web Design on February 28, 2015, 22:35:00 PM
try spoffing the ipn post and see what the 500 error is.. or the ones that were must be logged somewhere...
Title: Re: PayPal IPN fails in v2.6.16
Post by: mhuebler on March 01, 2015, 20:42:26 PM
same problem here. no paypal notify since 2.6.16 and no error is logged ! please anybody can help ?
Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on March 03, 2015, 06:28:54 AM
I can report the same issue on a site that was recently upgraded to 2.6.16.

Emails stopped being sent to admin and customer and also the order status is not updated from pending to confirmed.

I can confirm the paypal transaction works properly and both merchant and customer receive the email from paypal. 

J 2.5.28
VM 2.6.16
Title: Re: PayPal IPN fails in v2.6.16
Post by: alatak on March 03, 2015, 18:20:17 PM
Hello
I have done a release of the paypal plugin 2.6.16.2 that should fix the IPN problem, and the order status update.
You can update via the joomla update menu.
Title: Re: PayPal IPN fails in v2.6.16
Post by: mhuebler on March 03, 2015, 18:29:27 PM
thank you valerie for help !
Title: Re: PayPal IPN fails in v2.6.16
Post by: optmax on March 03, 2015, 19:44:20 PM
Thanks Valerie.
Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on March 03, 2015, 23:52:00 PM
Awesome work Valerie!

Thanks.
Title: Re: PayPal IPN fails in v2.6.16
Post by: falko1 on March 04, 2015, 12:39:07 PM
HI,

i had the same problem. I updated the paypal plugin to 2.6.16.2.
But the orderstatus do not chance.

Please i need help

Best Falko
Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on March 05, 2015, 07:15:04 AM
Yes, I can also confirm I installed the paypal plugin patch and the issue did not fix. I tried reinstalling the two VM files as well.

The paypal IPN works perfectly with VM 2.6.14 but broken on 2.6.16 still.

Thanks :)
Title: Re: PayPal IPN fails in v2.6.16
Post by: publicidad3 on March 06, 2015, 14:59:01 PM
Hello, im having some issues with this also updated the plugin, and as the ipn is failing we have recived a warning from paypal.  help with this please!
Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on March 06, 2015, 21:35:30 PM
I rolled back to 2.6.14 to get the paypal working again. Maybe you can do this while you wait.
Title: Re: PayPal IPN fails in v2.6.16
Post by: publicidad3 on March 06, 2015, 22:08:35 PM
im currently testing only rollback in the plugin, how do i make a compleat rollback?
Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on March 06, 2015, 23:20:03 PM
Disabled the new vm plugin and I just installed the J2.16.14 core and aio.
Title: Re: PayPal IPN fails in v2.6.16
Post by: optmax on March 07, 2015, 14:13:01 PM
paypal plugin to 2.6.16.2
VM 2.6.16
J! 2.5.27

Same for me...No IPN order updates
Title: Re: PayPal IPN fails in v2.6.16
Post by: alatak on March 09, 2015, 13:22:06 PM
Hello

Quotepaypal plugin to 2.6.16.2
VM 2.6.16
J! 2.5.27

Same for me...No IPN order updates
strange , the version 2.6.16.2 is the same as the one from 2.6.14
can you check in the joomla > extensions manager > manage, the the plugin has been updated correctly (check the version number) ?

I am included in this post the file that changed: plugins/vmpayment/paypal/paypal/helpers/paypal.php
Title: Re: PayPal IPN fails in v2.6.16
Post by: Milbo on March 09, 2015, 16:40:41 PM
Please test this package

http://dev.virtuemart.net/attachments/download/927/com_virtuemart.2.6.17_extract_first.zip
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 09, 2015, 19:21:53 PM
I also have the same issue as the other users on this thread and the updated 2.6.17 did not fix, when i look at IPN history in Paypal it just says Retrying but no error.

Emails stopped being sent to admin and customer and also the order status is not updated from pending to confirmed.

I can confirm the paypal transaction works properly and both merchant and customer receive the email from paypal. 

Should also confirm i switched IPN notifications off to test without it and same result, no emails from VM and no status update.

Any ideas?
Title: Re: PayPal IPN fails in v2.6.16
Post by: falko1 on March 09, 2015, 21:30:35 PM
I update to 2.6.17. Verified in plugin manager. All is updated to 2.6.17
after some testings i can also confirm...

NO order status updated to confirm. NO Email to Costumer and Admin.
Paypal payment is confirmed by email from paypal to admin and costumer.




Title: Re: PayPal IPN fails in v2.6.16
Post by: optmax on March 09, 2015, 22:27:01 PM
paypal plugin  2.6.17 (checked in Extension manager)
VM 2.6.17 Component & AIO
J! 2.5.27

Just the same results as falko1 - No order status update via IPN
Title: Re: PayPal IPN fails in v2.6.16
Post by: falko1 on March 10, 2015, 09:14:37 AM
I checkt the logfile and found a errror
See below:

2015-03-09 22:04:37 DEBUG PaymentNotification, order_number:: cf91016
2015-03-09 22:04:37 DEBUG PaymentNotification, virtuemart_paymentmethod_id:: 1
2015-03-09 22:04:37 DEBUG checkPaypalIps PRODUCTION:
2015-03-09 22:04:37 DEBUG checkPaypalIps REMOTE ADDRESS: 173.0.81.1
2015-03-09 22:04:37 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
Title: Re: PayPal IPN fails in v2.6.16
Post by: driver_wedge on March 10, 2015, 11:05:45 AM
I'm having the same issue as you guys. I've been watching this thread with interest over the past week....hope we can find a cause/solution soon.
Title: Re: PayPal IPN fails in v2.6.16
Post by: Milbo on March 10, 2015, 12:30:26 PM
Yeh but the question is, if you found the new option setting in vm config on the first tab.

The reason for your problems is that you are using a reversed proxy. I removed the uncertain headers, and we check now only for REMOTE_ADDR (the normal case), and X_FORWARDED_FOR which is very often used for ngnix and apache http://en.wikipedia.org/wiki/X-Forwarded-For. But any admin can set his own type. There are just some conventions.

If you know your header, just add it in the vmconfig and try again. For example this one X-Forwarded-Proto, we can add it, but we cannot add any by default, because they can be unsure, if there is no reverse proxy.
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 10, 2015, 13:42:23 PM
Hi, I am not using a proxy and have the issues i mentioned in my post above in this thread, i know this is community supported and i am not a programmer and as such don't have the skills to fix this, that said i have customers that right now are not getting email notifications and orders are confusing as we have to manually check everyone one for payment with paypal as nothing is being updated to confirmed.

I don't have the skills to fix this, just report the issue but what i am happy to do is pay to get it fixed a i need the store to be working correctly so both customers and us get email notifications and know what status orders are at.

Would this help if i was to pay for a fix????

Regards
Tony
Title: Re: PayPal IPN fails in v2.6.16
Post by: falko1 on March 10, 2015, 13:48:14 PM
Thanks for the anwer.

Yes, i found a new field in the config tab.
But i don´t understand the reverse proxy settings. I´m not shure that i use this proxy.

Is there any Method to find out the proxy settings?
Title: Re: PayPal IPN fails in v2.6.16
Post by: Milbo on March 10, 2015, 14:15:13 PM
Thank you volksman3, indeed it helps us a lot if you buy a membership http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail .

Also a common variable seems to be X-Forwarded-Proto

Please read here about Reverse Proxy http://en.wikipedia.org/wiki/Reverse_proxy

If you use a CDN, or if your server is using a load balancer, or when you activated it on your apache, or when use squid,ngnix, then you are using a reverse proxy. We do NOT talk about a proxy in a company, university or similar.
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 10, 2015, 14:24:22 PM
No problem, i will buy a membership today for sure if it helps, i looked into tithe link you sent and i do have WHM access to our server etc but down know where to begin with this - are there any step by step instructions i can follow to fix this as this is way beyond me right now?
Title: Re: PayPal IPN fails in v2.6.16
Post by: driver_wedge on March 10, 2015, 15:08:53 PM
Quote from: Milbo on March 10, 2015, 12:30:26 PM
Yeh but the question is, if you found the new option setting in vm config on the first tab.

Is this in VM 2.6.16 or 2.6.17....or both, perhaps?

Is there a simple reason why the Paypal IPN would suddenly not work any more? Has the updated VM component been changed in such a way that the IPN feature will no longer function under certain server environments? i.e. this is not a bug, but is a problem from the user end?
Title: Re: PayPal IPN fails in v2.6.16
Post by: Milbo on March 10, 2015, 19:32:44 PM
Most paypal payments do not check if the confirm comes actually from a paypal server. So "we" added a check to ensure that only paypal can update the order. The problems appear if you use a reverse proxy. So when paypal connects your shop, then your shop is behind the proxy (not the client like a normal proxy). So vm gets not the client Ip, vm gets the internal IP of the server, usually 127.0.0.1 and therefore the IP validation fails.
The core is almost the same as vm2.6.14, the difference is now only that I added an extra config setting, so that people using a reverse proxy, cdn, loadbalancer or similar can enter the variable of their reverse_proxy.

Here is a simple explanation http://blog.haproxy.com/2012/06/05/preserve-source-ip-address-despite-reverse-proxies/ or look here
http://nginx.com/resources/admin-guide/reverse-proxy/ and there you can see the problem

location /some/path/ {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_pass http://localhost:8000;
}

in this case the right variable is X-Real-IP, despite the fact that X_FORWARDED_FOR is the convention, the reason it is a "defacto" convention, because a lot people use it, but not anyone. Additionally to that, it could be that, if you use  X-Real-IP, that php wants X_REAL_IP. I must admit I know about that only theoretically and never configured it myself.

There is maybe a simple method to find the server variable. Just use somewhere in a layout or so

vmdebug('My server variable',$_SERVER);
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 10, 2015, 19:39:58 PM
Oh boy, thanks for the update but this is way beyond the average users head never mind the fact that most users don't even have access to there servers at this level and trying to get a host to make these changes who don't generally want to get involved is going to be a nightmare for allot of people, is there not easier way to get Virtuemart working again without the need for technical server configurations? I have used Virtuemart right since the day of its conception and have not had to do anything like this before, at best the odd patch and styling issues but this is way beyond and will put off allot of users?
Title: Re: PayPal IPN fails in v2.6.16
Post by: falko1 on March 10, 2015, 20:20:15 PM
I have found a solution for my problem.
Yes, it is very simple maybe it works for some other users.
I will share my solution with you.

I have a Joomla 2.5.28, VM 2.6.17 and AdminTool 3.4.4.
I have add the IP´s from the paypal notify.paypal.com (173.0.81.1, 173.0.81.33, 66.211.170.66) into the "Whitelist for Administration" in the Configure WAF page of the AdminTool.
Now the payment with paypal works perfect.

I can´t explain the reason... my english is not good enough.

Hope it helps

Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 10, 2015, 21:27:44 PM
Thanks Falko1, i just tried your fix and also ensured the Paypal IPs were not blocked by my servers csf fire wall (which they were not) but sadly it did not fix my issue.

No emails sent to customer, or admin and not update from pending to confirmed ;o(
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 10, 2015, 21:31:53 PM
Hi Milbo,

Could you explain what film i shout put vmdebug('My server variable',$_SERVER); in?

Regards
Tony
Title: Re: PayPal IPN fails in v2.6.16
Post by: optmax on March 10, 2015, 22:40:08 PM
VM 2.6.17 Component & AIO
J! 2.5.27

Milbo - thanks for all your time spent on this
I can now report some success  :)

As I know there is no Reverse Proxy involved at my server, on my test site I did this:
Deleted all my three Payment Methods (I had PayPal live, PayPal SandBox and Offline Credit Cards)
Reinstalled 2.6.17 Component & AIO
Recreated my PP Sandbox Payment method and made a test order - all worked , IPN received and order status updated
Recreated my Offline Credit card payment method - tested, all OK
Tested PP Sandbox again - all OK


I will now try on my live site and report back.


Title: Re: PayPal IPN fails in v2.6.16
Post by: optmax on March 10, 2015, 23:34:56 PM
Just updated my live site to 2.6.17 Component & AIO

This time I did not delete/recreate existing Payment Methods.

Test order using PayPal Sandbox has worked as expected - I will now watch out for a real order.

Thanks again Milbo & Alatak

Title: Re: PayPal IPN fails in v2.6.16
Post by: luigi.mor on March 11, 2015, 08:29:11 AM
This worked for me:

1) update to 2.6.17

AND

2) set (in Paypal account) charset UTF-8

look at https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding  -  other options
change both charset to UTF-8

(Paypal is in italian)
Title: Re: PayPal IPN fails in v2.6.16
Post by: driver_wedge on March 11, 2015, 11:08:28 AM
VM 2.6.17 seems to work for me. I haven't changed any settings within VM or Paypal, just a normal install of VM & AIO.

Thanks Milbo & Alatak. I too will try to support the VM subscription very soon.
Title: Re: PayPal IPN fails in v2.6.16
Post by: Milbo on March 11, 2015, 16:33:34 PM
Nice, great it works now for most people.

Quote from: volksman3 on March 10, 2015, 19:39:58 PM
Oh boy, thanks for the update but this is way beyond the average users head never mind the fact that most users don't even have access to there servers at this level and trying to get a host to make these changes who don't generally want to get involved is going to be a nightmare for allot of people, is there not easier way to get Virtuemart working again without the need for technical server configurations?

You seem to misunderstand the problem. There is something in your setup, which prevents that your server gives the correct client IP. This means that there is a special setup, which usually also includes these technical details.

What I did now is to use the defacto convention, but as I said before it is NOT a rule, and NOT a real convention. This is the reason it helps most users, but not anyone. So your hoster must give you this information.

But as I wrote before, you can try to find yourself. It should even work with the joomla sysinfo. Go here /administrator/index.php?option=com_admin&view=sysinfo to the tab PHP Information, then search in the Apache Environment variables for your own IP. There you can see also the problem, you will have something like

SERVER_NAME myshop.com
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 127.0.0.1

But remote address should be the IP of the client. Actually yours. So in your case, you need to find a variable there, with an IP, which is yours (check your router, to get your IP). So if you find then the variable with your IP, just enter it in the config field and it should work, then.
Title: Re: PayPal IPN fails in v2.6.16
Post by: driver_wedge on March 11, 2015, 17:07:08 PM
Just an update from me. All our pending IPNs seem to have come through now (and changed our Shipped orders back to Confirmed...lol), but things seem to have settled now and any new orders from today have worked 100%.

Two weeks of head-scratching, but now happy to have it resolved! :-)
Title: Re: PayPal IPN fails in v2.6.16
Post by: alatak on March 11, 2015, 19:20:15 PM
Quote from: falko1 on March 10, 2015, 20:20:15 PM
I have a Joomla 2.5.28, VM 2.6.17 and AdminTool 3.4.4.
I have add the IP´s from the paypal notify.paypal.com (173.0.81.1, 173.0.81.33, 66.211.170.66) into the "Whitelist for Administration" in the Configure WAF page of the AdminTool.
Now the payment with paypal works perfect
Yes, it is a interesting info.
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 11, 2015, 22:30:44 PM
Hi Milbo,

Thanks for the update, i uploaded a phpinfo file to my server to get the info you mentioned but mine looks ok as follows:

REMOTE_ADDR: 99.250.196.117 (this is my local ip so all good there)

SERVER_ADDR: 107.6.20.230 (this is the IP of my server where the site is hosted)

SERVER_PORT: 80

All checked out and looks correct based on what you are saying but i still don't get any customer or admin emails sent out or Paypal order updates to Confirmed?

I tried one of the other fixes above  e.g. deleting my paypal payment method, installing 2.6.17 again and then setting up a new paypal payment but this made no difference always.

A further update is i looked at the server error log and see i get a 404 for the IPN return URL which may be the issue but no clue how to fix it:
[Wed Mar 11 17:52:37 2015] [error] [client 99.250.196.117] File does not exist: /home/canhost/public_html/naturalz.ca/404.shtml, referer: http://www.naturalz.ca/index.php?option=com%5fvirtuemart&view=pluginresponse&task=pluginresponsereceived&on=69b60356&pm

Emails are sent out when i manually update the order to confirmed and say notify the customer so just  a paypal trigger issue causing them not to be sent out.

Any further ideas?

Regards
Tony
Title: Re: PayPal IPN fails in v2.6.16
Post by: Milbo on March 11, 2015, 22:54:21 PM
 http://www.naturalz.ca/index.php?option=com%5

%5?
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 11, 2015, 22:58:43 PM
Thanks for the quick response, i have no clue where that came from as that was reported in the error logs, my URL i have in paypals setup under IPN notifications is just:

http://www.naturalz.ca/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component

Not sure where that gets added to the mix?
Title: Re: PayPal IPN fails in v2.6.16
Post by: optmax on March 12, 2015, 11:37:23 AM
%5F is underscore
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 13, 2015, 01:40:23 AM
Hi Milbo,

Do you have any further insight into my issues - if it helps i did purchase a membership (order number b615021106)

Any help would be most welcome at this time as we have not received any paypal updates and subsequent site email to our customers.

Regards
Tony
Title: Re: PayPal IPN fails in v2.6.16
Post by: DomenFras on March 14, 2015, 23:43:17 PM
Hello,

is there already a solution know for paypal trouble (why order status doesn't change to compled). Please help ASAP.
Title: Re: PayPal IPN fails in v2.6.16
Post by: GJC Web Design on March 15, 2015, 10:45:46 AM
have you tried the 2.6.17 update?

It is stated in just about EVERY 2nd POST - GIVE YOUR VERSIONS if you want help
Title: Re: PayPal IPN fails in v2.6.16
Post by: ProRaceSupply on March 18, 2015, 02:05:28 AM
It would be helpful to list the steps to update.  I finally found it in the link several pages ago. Applying it fixed this problem but it took a lot of re-reading in this thread.

What I'd like to know is why Virtuemart thinks that 2.6.16 is hte latest update when it clearly breaks paypal payment for everyone.  SHouldn't this fix be pushed out.?
Title: Re: PayPal IPN fails in v2.6.16
Post by: tarichecco on March 19, 2015, 10:30:29 AM
Hi all,

I had the same problem and I resolved it:

After I upgraded to VM 2.6.17 Paypal still didn't  notify payments. The problem was in the table [DBPREFIX]_virtuemart_payment_plg_paypal. Upgrading process didn't update the table structure.

Maybe you have to remove Paypal method from Payment Method List and recreate it and the table is updated.

I recreated the table directly to DB with the query below (my previous table was empty) and all works fine.

Joomla 2.5.28
VM 2.6.17

Regards,
Fra

CREATE TABLE IF NOT EXISTS `x94uf_virtuemart_payment_plg_paypal` (
  `paypal_method` varchar(200) DEFAULT NULL,
  `paypal_fullresponse` text,
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `virtuemart_order_id` int(1) unsigned DEFAULT NULL,
  `order_number` char(64) DEFAULT NULL,
  `virtuemart_paymentmethod_id` mediumint(1) unsigned DEFAULT NULL,
  `payment_name` varchar(5000) DEFAULT NULL,
  `payment_order_total` decimal(15,5) NOT NULL,
  `payment_currency` smallint(1) DEFAULT NULL,
  `email_currency` smallint(1) DEFAULT NULL,
  `cost_per_transaction` decimal(10,2) DEFAULT NULL,
  `cost_percent_total` decimal(10,2) DEFAULT NULL,
  `tax_id` smallint(1) DEFAULT NULL,
  `paypal_custom` varchar(255) DEFAULT NULL,
  `paypal_response_mc_gross` decimal(10,2) DEFAULT NULL,
  `paypal_response_mc_currency` char(10) DEFAULT NULL,
  `paypal_response_invoice` char(32) DEFAULT NULL,
  `paypal_response_protection_eligibility` char(128) DEFAULT NULL,
  `paypal_response_payer_id` char(13) DEFAULT NULL,
  `paypal_response_tax` decimal(10,2) DEFAULT NULL,
  `paypal_response_payment_date` char(28) DEFAULT NULL,
  `paypal_response_payment_status` char(50) DEFAULT NULL,
  `paypal_response_pending_reason` char(50) DEFAULT NULL,
  `paypal_response_mc_fee` decimal(10,2) DEFAULT NULL,
  `paypal_response_payer_email` char(128) DEFAULT NULL,
  `paypal_response_last_name` char(64) DEFAULT NULL,
  `paypal_response_first_name` char(64) DEFAULT NULL,
  `paypal_response_business` char(128) DEFAULT NULL,
  `paypal_response_receiver_email` char(128) DEFAULT NULL,
  `paypal_response_transaction_subject` char(128) DEFAULT NULL,
  `paypal_response_residence_country` char(2) DEFAULT NULL,
  `paypal_response_txn_id` char(32) DEFAULT NULL,
  `paypal_response_txn_type` char(32) DEFAULT NULL,
  `paypal_response_parent_txn_id` char(32) DEFAULT NULL,
  `paypal_response_case_creation_date` char(32) DEFAULT NULL,
  `paypal_response_case_id` char(32) DEFAULT NULL,
  `paypal_response_case_type` char(32) DEFAULT NULL,
  `paypal_response_reason_code` char(32) DEFAULT NULL,
  `paypalresponse_raw` varchar(512) DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_by` int(11) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` int(11) NOT NULL DEFAULT '0',
  `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `locked_by` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='Payment Paypal Table' AUTO_INCREMENT=1 ;
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on March 31, 2015, 23:40:53 PM
I have been following this thread with anticipation trying every fix various users have put out there but i am still in a bad place with no em,ail notifications  being sent and no update to conformed on a successful payment. I bought a full membership to Virtuemart in hope of some help as i am at a loss.

I am running:

Joomla 2.5.26
Virtuemart 2.6.17

I have confirmed and tried the following:

I am not blocking the paypal IP addresses in my csf firewall
Checked the database structure of the paypal plugin table and all is ok
Checked the server setup complies as per previous posts reference Proxies and we are all ok
Tried re-installing 2.6.16 and 2.6.17
Tried with Paypal IPN notifications on and off
Tried deleting the payment method and re-creating it

All of the above have not fixed the issue. I am at the point of wanting to pay a developer for a fix - can anyone other help me?????

Regards
Tony




Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on April 01, 2015, 00:36:41 AM
I rolled back to Vm 2.6.14. It was the only solution I could get to work for my clients.
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on April 01, 2015, 00:49:52 AM
Thanks for the reply, could you tell me the procedure for rolling back without loosing order and product data etc?
Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on April 01, 2015, 01:20:45 AM
HI volksman - does that mean you own a volkswagen? please make it a kombi, please make it a kombi... :)

Just download the 2.6.14 files and install in the regular way. I don't think I uninstalled anything - although you might wantto akeeba backup your site and do a test where you uninstall the paypal plug that was put forward as the first fix. I've got three clients happily using 2.6.14 and processing payments through payapal.
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on April 01, 2015, 14:39:31 PM
lol use to have both a Beetle and Bus ;o) Thanks for this, i will try today and fingers crossed, i will report back my findings.
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on April 01, 2015, 16:56:59 PM
I rolled back to 2.6.14 and no luck so after many hours of digging deeper i found the issue!!!!

This his NOT virtue mart related but instead a false positive triggered in Mod_Security on the server, after some research it seams this is a common issue with Mod_Security blocking Paypal IPN notifications.

The rule that was blocking it is 960015: Request Missing an Accept Header

For now i have disabled the rule and the notifications work just fine now and email are sent with order updated. I am not trying to work out how to add an exception for the paypal IPN's so i can add this and switch the rule back on.

Hope this help some other having issues as it is not obvious or easy to find. I am still running 2.6.14 so the next step is to upgrade and see if it still works.
Title: Re: PayPal IPN fails in v2.6.16
Post by: evoltuion on April 02, 2015, 00:21:59 AM
That's odd then that I haven't touched mod_security and any upgrade from 2.6.14 stops paypal but a roll back to 2.6.14 fixes it. I'm on a Rochen dedicated server, who is your host?
Title: Re: PayPal IPN fails in v2.6.16
Post by: volksman3 on April 02, 2015, 01:25:16 AM
I'm running a VPS with Canadian web hosting and for sure odd but with so many versions of centos, php, MySQL it's no wonder some things cause a false positive. I found the block reports in mod security tools which showed one of the PayPal notify IP addresses blocked. Not all servers have mod security servers by default activated and even though you have the IP white listed in cf firewall etc it still blocks as they all work off there own rules. To add more confusion mod security has several plugins wilhich may or may not be activated with there own rule sets that can sometimes fight each other
Title: Re: PayPal IPN fails in v2.6.16
Post by: Tonimito on February 22, 2016, 16:21:18 PM
Hello,

I have the same problem, everything works perfectly except the Paypal IPN notification (work in Sandbox Mode).

Until last October 2015 I worked, we just updated versions of Joomla related (Joomla 3.4.8 and VM 3.0.12).

PayPal tells me HTTP 200 (As is correct) on a IPN Notification.

However, in the log paypal now:

2016-02-19 15:13:48 DEBUG PaymentNotification, order_number:: P2016021916
2016-02-19 15:13:48 DEBUG PaymentNotification, virtuemart_paymentmethod_id:: 2
2016-02-19 15:13:48 DEBUG checkPaypalIps SANDBOX: Array
(
    [0] => 173.0.82.126
)

2016-02-19 15:13:48 DEBUG checkPaypalIps REMOTE ADDRESS: 173.0.82.126
2016-02-19 15:13:48 ERROR validateIpnContent: Error while posting IPN:  ,  0
2016-02-19 15:13:48 DEBUG validateIpnContent: valid_ipn:
2016-02-19 15:30:26 DEBUG PaymentNotification, paypal_data:: Array
(
    [mc_gross] => 1.00
    [invoice] => P2016021911
    [auth_exp] => 07:10:28 Mar 20, 2016 PDT
    [protection_eligibility] => Eligible
    [address_status] => unconfirmed
    [payer_id] => SQD8KN7JTK4SQ
    [tax] => 0.00
    [address_street] => XXX
    [payment_date] => 07:30:19 Feb 19, 2016 PST
    [payment_status] => Completed
    [charset] => windows-1252
    [address_zip] => 08320
    [first_name] => test
    [transaction_entity] => payment
    [mc_fee] => 0.38
    [address_country_code] => ES
    [address_name] => name name
    [notify_version] => 3.8
    [custom] => iemmmvrfcik3mjud0nij49soo7
    [payer_status] => verified
    [business] => info-facilitator@sandbox.net
    [address_country] => Spain
    [address_city] => Barcelona
    [quantity] => 1
    [verify_sign] => AUifZwERiLeqHiGOvp8-DyOIYSJVAd801SiPX9p75xXdpeTBJG4wFWzK
    [payer_email] => info-buyer@sandbox.net
    [parent_txn_id] => 65B90485VF274201D
    [txn_id] => 3UX22966HT0182410
    [payment_type] => instant
    [remaining_settle] => 0
    [auth_id] => 65B90485VF274201D
    [last_name] => buyer
    [address_state] => 08
    [receiver_email] => info-facilitator@sandbox.net
    [auth_amount] => 29.07
    [payment_fee] =>
    [receiver_id] => TPCP44P35CQVG
    [txn_type] => web_accept
    [item_name] => P2016021911
    [mc_currency] => EUR
    [item_number] =>
    [residence_country] => ES
    [test_ipn] => 1
    [handling_amount] => 0.00
    [transaction_subject] =>
    [payment_gross] =>
    [auth_status] => Completed
    [shipping] => 0.00
    [ipn_track_id] => 18563d9beec80
)

2016-02-19 15:30:26 DEBUG PaymentNotification, order_number:: P2016021911
2016-02-19 15:30:26 DEBUG PaymentNotification, virtuemart_paymentmethod_id:: 2
2016-02-19 15:30:26 DEBUG checkPaypalIps SANDBOX: Array
(
    [0] => 173.0.82.126
)

2016-02-19 15:30:26 DEBUG checkPaypalIps REMOTE ADDRESS: 173.0.82.126
2016-02-19 15:30:26 ERROR validateIpnContent: Error while posting IPN:  ,  0
2016-02-19 15:30:26 DEBUG validateIpnContent: valid_ipn:


The hosting no used reversed Proxy (as indicated in: http://forum.virtuemart.net/index.php?topic=128518.msg442586#msg442586).

What can happen?
Thank you.
Title: Re: PayPal IPN fails in v2.6.16
Post by: reggaebkk on September 16, 2018, 05:02:52 AM
Hi,
I can see that the ticket has been idle for 3 years but I had that exact same problem starting a couple of months back on my website.
I am not sure why, maybe it's because I have moved to https at about the same period, not sure if it's related.
Also I'm not a coder so I'm at a loss, I've tested about every configuration I could think of and still get it.
I have also checked on my modsec rules, the rules mentioned here were already ignored, my firewall has Paypal IPs whitelisted...
My website is https://pailingemstones.com, does anyone have an idea?
Title: Re: PayPal IPN fails in v2.6.16
Post by: AH on September 16, 2018, 08:33:18 AM
Move to the latest versions and in the paypal - turn of paypa IP checking

Under configuration
Check IPN provider IP - set to No
Title: Re: PayPal IPN fails in v2.6.16
Post by: eshopmaker.gr on July 18, 2020, 16:19:17 PM
i Have the same issue but thanks to this thread i fix it. Thanks.