Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-01-2015, 07:34 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-01-2015, 07:37 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any error logs?
Reply With Quote
  #3  
Old 02-01-2015, 07:47 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 02-01-2015, 08:17 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.vbulletin.com/forum/forum...hings?t=255511

https://vborg.vbsupport.ru/showthread.php?t=310734
Reply With Quote
  #5  
Old 02-01-2015, 08:44 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 02-02-2015, 07:09 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then download the 4.2.1 package.
Reply With Quote
  #7  
Old 02-04-2015, 09:39 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 02-04-2015, 10:18 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 02-04-2015, 11:20 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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);
			}
		}
Reply With Quote
Благодарность от:
ozzy47
  #10  
Old 02-04-2015, 11:24 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahhh, I compared 4.2.2. to 4.2.3 that is why I did not find any other differences.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:17 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.06113 seconds
  • Memory Usage 2,259KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete