Hi,
I solved a bug with Paypal IPN, here is my solution.
I didn't know while orders kept the "Pending" status while payments in Paypal where OK, using joomla 3.8.12 and PhocaCart 3.1.2 on php 7.1.
In fact I received an email from Paypal saying my notification URL (index.php?option=com_phocacart&view=response&task=response.paymentnotify&type=paypal_standard&pid=1&tmpl=component) was throwing an error.
This URL showed an error page, a 500 http header, and an evasive "error 0 : can't load phocacartimport()" but with no file name, even when enabling debug and development verbosity for php.
So I switched to php v5.6 and then got a proper mention of the file to debug (/plugins/pcp/paypal_standard/helpers/ipnlistener.php).
As it simply lacked the Phocacart initialisation, I had to add :
if (! class_exists('PhocacartLoader')) {
require_once( JPATH_ADMINISTRATOR.'/components/com_phocacart/libraries/loader.php');
}
before :
phocacartimport('phocacart.utils.log');
And everything now works OK, orders status are switching to "completed" as soon as payments are validated by Paypal.
Maybe should this fix be introduced in the next release ?
-Mato