VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Sobaros on February 24, 2023, 18:11:35 PM

Title: PayPal standard - IPN verification failing on Joomla 4
Post by: Sobaros on February 24, 2023, 18:11:35 PM
Joomla 4.2.8
VirtueMart 4.0.12
PHP 8.0

Using the default PayPal plugin, taking payments with PayPal Standard.

Regarding file: /administrator/components/com_virtuemart/plugins/vmpsplugin.php

The above file contains a reference to JSessionStorage (line 1507):

$sessionStorage = JSessionStorage::getInstance ($handler, $options);

I believe JSessionStorage was removed in Joomla 4, so its presence in the code causes PHP to raise an error:

QuoteError: Class "JSessionStorage" not found

As a result, IPN verification calls fail when POSTing to /index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=

The above URL returns HTTP 500 status, causing PayPal IPN to repeatedly retry the verification call. However, VirtueMart successfully processes each call, setting orders confirmed and emailing the buyer every time IPN makes its verification attempt.

Is this a known bug, and will it receive a fix?

Is there a workaround to this problem?

Many thanks in advance ...
Title: Re: PayPal standard - IPN verification failing on Joomla 4
Post by: jenkinhill on February 25, 2023, 13:09:25 PM
Repeated emails following a PayPal transaction have been reported by forum members for some time now, not just for J4.

Solutions at the moment include turning off "Check IPN provider IP" in the plugin, code editing (https://forum.virtuemart.net/index.php?topic=148961.msg534143#msg534143) to change the way order is status set by PayPal, or the use of an alternate payment plugin that uses webhooks  http://forum.virtuemart.net/index.php?topic=140629.msg534139#msg534139

It is probable that the VM team will develop a new PP plugin to address changes being made by PayPal.