We get an error when PayPal is trying to confirm payment. In a nice letter Paypal tells us about the problem and shows the offending link, which is .../administrator/components/com_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php
. Opening that link gives the following backtrace:
CRM_Core_Exception: PayPalIPN: Could not find an entry for module in ...com_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php on line 315
Exception trace
# Function Location
0 CRM_Core_Payment_PayPalIPN->retrieve('module', 'String') ...com_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php:315
1 CRM_Core_Payment_PayPalIPN->main() ...com_civicrm/civicrm/CRM/Core/Payment/PayPalImpl.php:780
2 CRM_Core_Payment_PayPalImpl::handlePaymentNotification() ...com_civicrm/civicrm/CRM/Core/Payment.php:1379
3 CRM_Core_Payment::handlePaymentMethod('handlePaymentNot…', Array) ...com_civicrm/civicrm/CRM/Core/Payment.php:1281
4 CRM_Core_Payment::handleIPN() ...com_civicrm/civicrm/CRM/Core/Invoke.php:275
5 CRM_Core_Invoke::runItem(Array) ...com_civicrm/civicrm/CRM/Core/Invoke.php:84
6 CRM_Core_Invoke::_invoke(Array) ...com_civicrm/civicrm/CRM/Core/Invoke.php:52
7 CRM_Core_Invoke::invoke(Array) ...com_civicrm/civicrm.php:96
8 civicrm_invoke() ...com_civicrm/civicrm.php:11
9 require_once('/var/www/events/…') ...libraries/src/Component/ComponentHelper.php:382
10 Joomla\CMS\Component\ComponentHelper::executeComponent('/var/www/events/…') ...libraries/src/Component/ComponentHelper.php:357
11 Joomla\CMS\Component\ComponentHelper::renderComponent('com_civicrm') ...libraries/src/Application/SiteApplication.php:194
12 Joomla\CMS\Application\SiteApplication->dispatch() ...libraries/src/Application/SiteApplication.php:233
13 Joomla\CMS\Application\SiteApplication->doExecute() ...libraries/src/Application/CMSApplication.php:195
14 Joomla\CMS\Application\CMSApplication->execute() ...index.php:49
15 {main}
Any ideas on what to do to debug? We're using Joomla 3.8.12 and Civi 5.4.1.
Update: I'm looking at the code there which says:
$component = $this->retrieve('module', 'String');
I'm suspecting that this means that it's trying to retrieve the module part of the calling URL (/administrator/components/com_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php
). So this URL is malformed for the IPN, right?
How does the retrieve()
work?
UPDATE: When entering URL .../administrator/components/com_civicrm/civicrm/extern/ipn.php
I get
The transaction has failed. Please review the log for more detail
and in the civicrm_system_log
database table there is an entry, but with an empty "context" field, in which I suspect the transactionID etc. is supposed to be. This is natural in this case.
So I updated the IPN URL in the Paypal account to this and tried a resend of the latest failed IPN. It failed again, and even with the update URL I get a log entry in the civicrm_system_log
table.
So it seems that Paypal has no "context" info for the transaction.
I've also checked that the URL does not redirect (using Redirect Checker), since this question seem to indicate that you loose POST data on redirect (which seems odd, but WTH and JIC).
retrieve
is only a function in Paypalipn.php which looks for the required input parameters and errors if it is not able to find them{"module":"event","contactID":"12468","contributionID":661,"eventID":"93","participantID":2233}