View Full Version : FIXED - Paid Subscriptions problem - need some help
Snowhog
02-01-2015, 07:34 PM
Paid Subscriptions purchased by our members since we upgraded to 4.2.3 Beta 3 are being recorded in the Transaction Log and Transaction Stats as Failures. As a result, the members who purchase these subscriptions aren't being identified with the additional usergroups associated with our Paid Subscription levels, and the Subscription Manager isn't being updated with these subscriptions. But, according to our Host, he is receiving the payments.
I have a copy of the version 4.2.1 class_paypal.php file and compared it to the version 4.2.3 Beta 3 class_paypal.php file. There are a few significant differences.
I don't have a copy of the version 4.2.1 class_paid_subscription.php file, so I don't know if this file may also be affecting this issue.
I need to know how to fix this issue.
Thank you.
ForceHSS
02-01-2015, 07:37 PM
Any error logs?
Snowhog
02-01-2015, 07:47 PM
For each of the 'Failures' in the Transaction Log Transaction Details, under the heading API is shown:
vb_error_code authentication_failure
However, under the heading POST, there is a verify_sign entry, and the payment_status reflects Completed.
ForceHSS
02-01-2015, 08:17 PM
http://www.vbulletin.com/forum/forum/vbulletin-legacy-versions-products/legacy-vbulletin-versions/vbulletin-3-6-questions-problems-and-troubleshooting/261771-paid-subscriptions-not-working-check-these-things?t=255511
https://vborg.vbsupport.ru/showthread.php?t=310734
Snowhog
02-01-2015, 08:44 PM
Neither of those links are helpful, but thank you.
As stated, before we upgraded to vBulletin 4.2.3 Beta 3, Paid Subscriptions were working correctly.
But we also upgraded our Linux server to Ubuntu 14.04.1 LTS, which included PHP 5.5.9. PHP 5.5.9 was incompatible with vBulletin 4.2.2 PL3/4, so as recommended, we upgraded to 4.2.3 Beta 3, which fixed all the problems we were experiencing. So it may be that PHP 5.5.9 is a contributing factor with our Paid Subscription issue?
--------------- Added 1422843729 at 1422843729 ---------------
Can I just replace the 4.2.3 Beta 3 class_paypal.php file with the original 4.2.1 class_paypal.php file?
--------------- Added 1422865353 at 1422865353 ---------------
I need a copy of version 4.2.1 class_paid_subscription.php file so I can compare it against the 4.2.3 Beta 3 file.
cellarius
02-02-2015, 07:09 AM
Then download the 4.2.1 package.
Snowhog
02-04-2015, 09:39 PM
Replaced class_paypal.php, payment_gateway.php, and payments.php with version 4.2.1 of each and our issue with Paid Subscriptions is "fixed". Still waiting for some response on our filed trouble ticket on vbulletin.com as to why the 4.2.3 Beta 3 version of these files caused this issue in the first place.
ozzy47
02-04-2015, 10:18 PM
Well in includes/paymentapi/clas_paypal.php line 60 was changed.
From:
$mc_gross = doubleval($this->registry->GPC['mc_gross']+ ($this->registry->GPC['payment_status'] == 'Canceled_Reversal' ? $vbulletin->GPC['mc_fee'] : 0));
To:
$mc_gross = doubleval($this->registry->GPC['mc_gross']+ ($this->registry->GPC['payment_status'] == 'Canceled_Reversal' ? $this->registry->GPC['mc_fee'] : 0));
Nothing was changed in payments.php.
Nothing was changed in payment_gateway.php.
So it is pretty easy to figure out where the issue lies. :)
Snowhog
02-04-2015, 11:20 PM
My first thing was to compare the files to the version 4.2.1 files. I noticed what you pointed out, and wondered if the change from:
'Canceled_Reversal' ? $vbulletin->GPC
to:
'Canceled_Reversal' ? $this->registry->GPC
was the cause, or a contributing cause.
But in the 4.2.3 Beta 3 version of includes/paymentapi/class_paypal.php, the following lines were 'added':
80: curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));
92: $this->error_code = 'curl_failure';
197: curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));
Line 92 above replaced this block of code:
$header = "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Host: www.paypal.com\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($query) . "\r\n\r\n";
if ($fp = fsockopen('www.paypal.com', 80, $errno, $errstr, 15))
{
socket_set_timeout($fp, 15);
fwrite($fp, $header . $query);
while (!feof($fp))
{
$result = fgets($fp, 1024);
if (strcmp($result, 'VERIFIED') == 0)
{
break;
}
}
fclose($fp);
}
And this block of code was removed completely (lines 219 through 240 in the 4.2.1 version):
if (!$communication)
{
$header = "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Host: www.paypal.com\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($query) . "\r\n\r\n";
if ($fp = fsockopen('www.paypal.com', 80, $errno, $errstr, 15))
{
socket_set_timeout($fp, 15);
fwrite($fp, $header . $query);
while (!feof($fp))
{
$result = fgets($fp, 1024);
if (strcmp($result, 'INVALID') == 0)
{
$communication = true;
break;
}
}
fclose($fp);
}
}
ozzy47
02-04-2015, 11:24 PM
Ahhh, I compared 4.2.2. to 4.2.3 that is why I did not find any other differences.
Snowhog
02-04-2015, 11:30 PM
We upgraded from vBulletin 4.2.2 PL 3 to 4.2.3 Beta 3 when we upgraded our server toUbuntu 14.04.1 LTS, which included PHP 5.5. As you recall, vBulletin 4.2.2 wasn't compatible with PHP 5.5, and was giving us all sorts of issues. 4.2.3 Beta 3 fixed all of that. But is was our upgrade to 4.2.3 Beta 3 that resulted in the problem with Paid Subscriptions.
I would really rather be using the same file versions that Paid Subscriptions use, but the problem must be identified and fixed before I consider putting those version files back.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.