VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: sylwekb on July 08, 2019, 21:56:00 PM

Title: There was an error with the paypal payment method in your store
Post by: sylwekb on July 08, 2019, 21:56:00 PM
Joomla 3.9.8 Virtuemart 3.4.2

Today I received an e-mail with the following message. This is the first time I have encountered such a problem. How to solve it?

Message bottom

Hello,

There was an error with the paypal payment method in your shop. trailer. details have been registered in the paypal.2.log.php file

. Team
Title: Re: There was an error with the paypal payment method in your store
Post by: Jörgen on July 08, 2019, 22:23:27 PM
Firstly, read the error file.

Jörgen@ Kreativ Fotografi
Title: Re: There was an error with the paypal payment method in your store
Post by: sylwekb on July 09, 2019, 08:55:03 AM
In this file, I have only 2 entries. What do they mean?

2019-07-08 19:40:50 ERROR validateIpnContent: Invalid IPN validation: NO ANSWER FROM PAYPAL
2019-07-08 19:41:31 ERROR validateIpnContent: Invalid IPN validation: NO ANSWER FROM PAYPAL
Title: Re: There was an error with the paypal payment method in your store
Post by: AH on July 09, 2019, 09:47:07 AM
It means PayPal did not respond to VM when it tried to verify an IPN message

This can happen and is not VM's issue.

If it continues - contact PayPal support
Title: Re: There was an error with the paypal payment method in your store
Post by: clairemarie on July 13, 2019, 08:31:35 AM
I wanted to add to this post that I have also started receiving these messages.
14 occasions in the last 2 weeks.

I have raised a ticket with https://www.paypal-support.com - 5 days later I am still awaiting a response.

Title: Re: There was an error with the paypal payment method in your store
Post by: AH on July 13, 2019, 09:24:53 AM
If you have an account manager contact - it is often best to talk with them.

I spent weeks getting them to admit that a fault was down to them - eventually they said they were in the middle of software changes.

This IPN message validation failure is annoying for busy stores - but it is not a VM issue -  as per the PayPal specification for security purposes VM has to ensure that the IPN message is validated before it modifies an order to confirmed.
Title: Re: There was an error with the paypal payment method in your store
Post by: level420 on July 15, 2019, 16:15:27 PM
@clairemarie did you ever get an answer from paypal support?

I've also had 2 orders which failed due to the "NO ANSWER FROM PAYPAL" error.

@AH As I've understood the code in root/plugins/vmpayment/paypal/paypal/helpers/paypal.php in function validateIpnContent the error is logged if neither VERIFIED nor INVALID is contained as a string in the answer from the paypal server.
IMHO the error message misleading as the server DOES send an answer, but does not contain the desired keywords. I think it would be very valuable to have the content of the answer for debugging purposes and name it accordingly.


Quote from: clairemarie on July 13, 2019, 08:31:35 AM
I wanted to add to this post that I have also started receiving these messages.
14 occasions in the last 2 weeks.

I have raised a ticket with https://www.paypal-support.com - 5 days later I am still awaiting a response.


Title: Re: There was an error with the paypal payment method in your store
Post by: AH on July 15, 2019, 19:54:09 PM
The code sets a $res as '' (empty)

It looks for data in a response allocated to $res

If it sees a value of VERIFIED - then it assumes all is good so far

If it sees a value of INVALID - it logs a debug error with $res

"Invalid IPN validation"

If $res is empty or does not contain INVALID OR VERIFIED it will log a different debug error from INVALID

"Invalid IPN validation : NO ANSWER FROM PAYPAL"

And as you noted - it does not include and $res data but could easily be catered for - please feel free to try this code.


// Inspect IPN validation result and act accordingly
$valid_ipn = strstr($res, "VERIFIED");
if (!$valid_ipn) {
if (strstr($res, "INVALID")) {
$errorInfo = array("paypal_data" => $paypal_data, 'post_msg' => $post_msg, 'paypal_res' => $res);
$this->debugLog($errorInfo, vmText::_('VMPAYMENT_PAYPAL_ERROR_IPN_VALIDATION'), 'error', false);
} else {
$errorInfo = array('paypal_res' => $res);
$this->debugLog($errorInfo,vmText::_('VMPAYMENT_PAYPAL_ERROR_IPN_VALIDATION') . ": NO ANSWER FROM PAYPAL", 'validateIpnContent', 'error', false);
}
}

Title: Re: There was an error with the paypal payment method in your store
Post by: clairemarie on July 15, 2019, 21:42:50 PM
I had a response from PayPal Support this morning asking for more information.
It took them 7 days to respond to the original query - I will await their answer.

We are now getting 3-4 of these a day.
Title: Re: There was an error with the paypal payment method in your store
Post by: clairemarie on July 18, 2019, 11:25:59 AM
PayPal did come back to me with a vague response - they clearly didn't read my question properly

"Upon checking in our internal system for the transaction id's you have sent, I see the transaction is success and IPN is success as well.  I don't see any issue in IPN and the transaction.

I would request you to double check, how you are updating in your application."


We have not had further errors this week so I will leave it for now.
Title: Re: There was an error with the paypal payment method in your store
Post by: AH on July 18, 2019, 13:58:16 PM
Thanks for the update - this can often be the case for PayPal - things suddenly "start working" when they dont answer for ages
Title: Re: There was an error with the paypal payment method in your store
Post by: lostmail on July 18, 2019, 21:29:21 PM
Seems to be a paypal-Problem:

2019-07-18 12:53:38 ERROR validateIpnContent: Ungültige IPN Validierung: NO ANSWER FROM PAYPAL

Got the same error message and found the entry in Virtuemart / tools / protocol / paypal.2.log.php

I think it`s a one time problem...