3

About two months ago, we started getting the following notifications 2x/day via email from PayPal. It appears Civi returns response 200 (error) for non-recurring transactions rather than 500 response (success). The email from PPL says they may disable our account if the issue continues so I'm really worried. We had a pro look at the code, saying there should not be an IPN call for non-recurring transactions, and that Civi throws the error because it doesn't expect it. He's also saying the Civi code handling this hasn't been touch for a long time, and that it's possibly on the PayPal side. We certainly haven't changed any PPL settings ... so wondering if anyone else is seeing these warning emails from PPL:

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing: https:///civicrm/extern/ipn.php If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account. Thank you for your prompt attention to this issue. Thanks, PayPal

Anyone, anyone?

  • We are also seeing this on CiviCRM 5.5. When we were using 4.7.x and prior it was not an issue. – Zachary Sep 25 '18 at 6:20
  • 1
    The URL you pasted seems to be wrong for ipn call back! Did you trim the url? – Pradeep Nayak Sep 25 '18 at 7:08
  • 1
    Sorry, yes, the full IPN URL in PayPal is: <our site URL>/administrator/components/com_civicrm/civicrm/extern/ipn.php; this is a Joomla implementation; the URL is correct - a 3rd party Civi developer who looked at the code and logs said the calls from PayPal are reaching Civi, but apparently it should NOT be doing so for non-recurring payments; and since Civi is not expecting a call from PayPal, it freaks out and sends an error to PayPal. Seems odd to me, but that's what I'm being told – MtnPavlas Oct 19 '18 at 10:48
  • @MtnPavlas I'm running into the same issue. Who was the professional developer you spoke with? maybe we can combine our efforts to a solution – CiviTeacher Dec 17 '18 at 21:11
  • There have been improvements to the paypal IPNs during the 5.x release cycle. However, this is most likely a pre-existing issue and may require changes to the IPN processor in CiviCRM to "ignore" or send a 200 OK response to paypal for non-recurring transactions. – Matthew Wire Dec 23 '18 at 14:17
2

Thank you for the confirmation others are seeing this issue. In the end, this solved it for us - add lines 4-6 from the following code (lines 1-3 and 7-9 included for reference) to file /CRM/Core/Payment/PayPalProIPN.php

CRM_Core_Error::debug_var('GET', $_GET, TRUE, TRUE);
CRM_Core_Error::debug_var('POST', $_POST, TRUE, TRUE);
if ($this->_isPaymentExpress) {
  if (empty($this->_inputParameters['rp_invoice_id'])) {
    return;
  }
  $this->handlePaymentExpress();
  return FALSE;
}
  • has this been suggested as a patch to CiviCRM? – Zachary Jan 22 at 20:35
  • 1
    I was told by the person who fixed this for us that it would be, but I don't see this change in the 5.9.0 version so guessing it hasn't happened yet; if you know how to submit the patch, please do; in the meantime, I can nudge the developer in question – MtnPavlas Jan 22 at 21:21
  • It may not have been submitted as a patch because a similar or same issue and solution is being discussed: lab.civicrm.org/dev/core/issues/659 – Evan Mar 1 at 3:05
1

I've been seeing this in various versions of CiviCRM starting in roughly Sep of this year. Note in the original post that actually 500=error vs. 200=success, but other than that, the description of the symptom I'm seeing is accurate. I think that (just guessing) something has changed in the way that Paypal is using the IPN URL - and sending it things it didn't used to. What happens, after 100 failures, is that Paypal will stop sending IPN completely, and you must re-enable IPN via the Paypal.com 'profile' console.

0

Just upgraded from 4.7.27 --> 5.8.1 and have now started seeing the issue with all non-recurring payments returning an error to PayPal. Then PayPal disabled IPNs for all payments, including recurring.

I had to copy civicrm/CRM/Core/Payment/PayPalProIPN.php from the old version to "solve" the problem.

I also saw this in the logs:

PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php on line 214
PHP Stack trace:
PHP 1. {main}() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/extern/ipn.php:0
PHP 2. CRM_Core_Payment_PayPalProIPN->main() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/extern/ipn.php:59
PHP 3. CRM_Core_Payment_PayPalProIPN->handlePaymentExpress() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php:428
PHP 4. CRM_Core_Payment_PayPalProIPN->recur() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php:602
PHP 5. array_flip() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php:214

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.