vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   FIXED - Paid Subscriptions problem - need some help (https://vborg.vbsupport.ru/showthread.php?t=317086)

Snowhog 02-01-2015 07:34 PM

FIXED - Paid Subscriptions problem - need some help
 
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...hings?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 [DATE]1422843729[/DATE] at [TIME]1422843729[/TIME] ---------------

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 [DATE]1422865353[/DATE] at [TIME]1422865353[/TIME] ---------------

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:
Code:

                $mc_gross = doubleval($this->registry->GPC['mc_gross']+ ($this->registry->GPC['payment_status'] == 'Canceled_Reversal' ? $vbulletin->GPC['mc_fee'] : 0));
To:
Code:

                $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:

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):
Code:

                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.


All times are GMT. The time now is 10:43 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01066 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete