[Beta] Paypal IPN GROUP Subscription MOD [1.1.3]

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
crownroyal
I've Been Banned!
Posts: 187
Joined: Fri Mar 18, 2005 12:35 am

Post by crownroyal » Thu Apr 21, 2005 10:23 pm

Sorry Sandro I didnt reply. Thank you so much in helping me fix my issue. Great work on this mod ! Its fantastic !

defender39
Registered User
Posts: 169
Joined: Wed Nov 26, 2003 9:22 am

Post by defender39 » Sat Apr 23, 2005 2:13 am

I see a bug.

Line 87 lwtopup.php

Code: Select all

if( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD || $uservip == 1 )
If a user is a MOD in ANY forums it will not allow that person to join. It says they have full access already.

defender39
Registered User
Posts: 169
Joined: Wed Nov 26, 2003 9:22 am

Post by defender39 » Sat Apr 23, 2005 2:46 am

Upon further testing...the IPN does not work either if someone has any MOD status in the forums.

This should be fixed or at least noted. I asked my staff to do testing and this of course was how I found out.

defender39
Registered User
Posts: 169
Joined: Wed Nov 26, 2003 9:22 am

Post by defender39 » Tue Apr 26, 2005 3:58 am

This mod is listed as CASH MOD compatible.

But HOW? My points are already called user_points.

I have the paypal IPN working great as I have already a dozen paid subscribers in a couple days. But what I want to do is also allow those who have earned enough points to be able to buy a subscription as well.

Any help would be great.

Johnny T
Registered User
Posts: 32
Joined: Thu Sep 23, 2004 7:49 pm

Post by Johnny T » Sun May 01, 2005 11:57 am

I installed this MOD fine but there is a bug. If your trial period is set to anything except 0 then any visitor can view / post etc in ANY forum regardless of whether they are set to private / MOD/ Admin etc.

The piece of code that is the problem is here:

Code: Select all

//-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP 		
//-- add
	//is user a vip?
	$uservip = 0;
	if($userdata['user_rank'] > 0)
	{
		$sql = "SELECT r.rank_id, r.rank_title  
			FROM " . RANKS_TABLE . " r 
			WHERE r.rank_id = " . $userdata['user_rank'];
		if ( ($resultr = $db->sql_query($sql)) )
		{
			if( $rowr = $db->sql_fetchrow($resultr) )
			{
				if(strcmp($rowr['rank_title'], VIP_RANK_TITLE) == 0)
				{
					$uservip = 1;
				}
			}	
		}
	}

	//or is it a temp vip: within trial period
	if($userdata['user_expire_date'] == 0 && time() <= ( $userdata['user_expire_date'] == 0 ? ($userdata['user_regdate'] + intval($board_config['lw_trial_period']) * 24 * 60 * 60) : (time() - 100)  ))
	{
		$uservip = 1;
	}
//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP
It seems the last bit of the code that says that someone is in their trial period is setting the $uservip to equal 1 for anyone who is just visiting the board. Later in the code this then overwrites any forum permissions you have set by allowing them to post / view regardless of phpBB permissions.

Is there a fix for this?

Thanks for the help, its gonna be a great MOD when this is fixed...

:)

crownroyal
I've Been Banned!
Posts: 187
Joined: Fri Mar 18, 2005 12:35 am

Test Mod

Post by crownroyal » Fri May 27, 2005 3:08 am

This is the exact problem I have, I went to my settings to create a new group and put to charge 9.99 for 7 days. I then scrolled down and put 0 so i dont charge him/her anything then I added 1 day trial . I submit and did some testing and when I go to the pay group I dont see any indication of teh free trial but only teh subscribe button and it takes me to pay the 9.99 immediately. Is there any fix to this ?

Please help.

sandodo
Registered User
Posts: 278
Joined: Mon Jul 19, 2004 7:13 am
Location: 11111111
Contact:

Post by sandodo » Wed Jun 01, 2005 8:09 am

defender39 wrote: This mod is listed as CASH MOD compatible.

But HOW? My points are already called user_points.

I have the paypal IPN working great as I have already a dozen paid subscribers in a couple days. But what I want to do is also allow those who have earned enough points to be able to buy a subscription as well.

Any help would be great.


sorry guys I have not monitored this thread often because I am quite busy so I only answered the question in my forum.

For my MOD, it can use an idependent points system, so it will not interfere with the cash mod, you can still allow users to earn points with cash mods, and allow they to buy subscription to a group with their cash mod points.
My site - based on PHPBB
http://www.singapurate.com

sandodo
Registered User
Posts: 278
Joined: Mon Jul 19, 2004 7:13 am
Location: 11111111
Contact:

Post by sandodo » Wed Jun 01, 2005 8:15 am

Johnny T wrote: I installed this MOD fine but there is a bug. If your trial period is set to anything except 0 then any visitor can view / post etc in ANY forum regardless of whether they are set to private / MOD/ Admin etc.

The piece of code that is the problem is here:

Code: Select all

//-- mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP 		
//-- add
	//is user a vip?
	$uservip = 0;
	if($userdata['user_rank'] > 0)
	{
		$sql = "SELECT r.rank_id, r.rank_title  
			FROM " . RANKS_TABLE . " r 
			WHERE r.rank_id = " . $userdata['user_rank'];
		if ( ($resultr = $db->sql_query($sql)) )
		{
			if( $rowr = $db->sql_fetchrow($resultr) )
			{
				if(strcmp($rowr['rank_title'], VIP_RANK_TITLE) == 0)
				{
					$uservip = 1;
				}
			}	
		}
	}

	//or is it a temp vip: within trial period
	if($userdata['user_expire_date'] == 0 && time() <= ( $userdata['user_expire_date'] == 0 ? ($userdata['user_regdate'] + intval($board_config['lw_trial_period']) * 24 * 60 * 60) : (time() - 100)  ))
	{
		$uservip = 1;
	}
//-- fin mod : Loewen Enterprise - PAYPAL IPN REG / SUBSCRIPTION - GROUP
It seems the last bit of the code that says that someone is in their trial period is setting the $uservip to equal 1 for anyone who is just visiting the board. Later in the code this then overwrites any forum permissions you have set by allowing them to post / view regardless of phpBB permissions.

Is there a fix for this?

Thanks for the help, its gonna be a great MOD when this is fixed...

:)


You can set a board configuration value to state which forums are execept from the VIP or temp VIP status. for example, forums_not_for_vip, set its value to be, for example, 2,16,28 then in the codes above, add some codes to:

check where current forum is in that list or not, if yes, then ignore the vip member's overwrite.

for example a sudo-code:
$except_forum = 0;
if (forum_id is in list forums_not_for_vip)
{
$except_forum = 1;
}


then when overwrites any forum permissions,
add a condition for the if, && $except_forum == 0

it will solve your issue.
My site - based on PHPBB
http://www.singapurate.com

sandodo
Registered User
Posts: 278
Joined: Mon Jul 19, 2004 7:13 am
Location: 11111111
Contact:

Post by sandodo » Wed Jun 01, 2005 8:21 am

there is a EasyMOD conpatible version of installation instruction contributed by The_Todd, the download link is at my site: http://bbs.loewen.com.sg
My site - based on PHPBB
http://www.singapurate.com

crownroyal
I've Been Banned!
Posts: 187
Joined: Fri Mar 18, 2005 12:35 am

Paypal subscription 1.0.3

Post by crownroyal » Wed Jun 15, 2005 12:04 am

I have a problem, everything works in the Paypal Ipn 1.0.3 mod accept after paypal sends the info back to my forum, in the User Subscription Information in the control panel, it doenst update the In this group? to yes and Expiration Date is not updated automatically but it accepts the money. Which file updates the User Subscription Information

I had this working 2 weeks ago but now it stopped. Can someone please help me out ?


Thanks in advance

BarrieUK
Registered User
Posts: 167
Joined: Wed Aug 21, 2002 3:25 pm
Contact:

Post by BarrieUK » Mon Jul 11, 2005 6:51 pm

Have installed the mod but seem to have lost all the permission settings all I get is the following. Anyone have any idea what file has caused this please?

Image

sandodo
Registered User
Posts: 278
Joined: Mon Jul 19, 2004 7:13 am
Location: 11111111
Contact:

Post by sandodo » Tue Jul 12, 2005 1:14 am

no idea, since my MOD doesnot modify the Forum Permissions and Group Permissions.
My site - based on PHPBB
http://www.singapurate.com

BarrieUK
Registered User
Posts: 167
Joined: Wed Aug 21, 2002 3:25 pm
Contact:

Post by BarrieUK » Tue Jul 12, 2005 6:14 am

Had a feeling you would say that. Obviously I have modified something with another mod that has caused it.

Can anyone point me in the right direction to the files that would prevent the details populating the permissions please. At least I would know where to start looking.

Another odd thing that happens, if I click on the submit button at the bottom of the permissions, my admin level is removed.

I really would appreciate some guidance please

BarrieUK
Registered User
Posts: 167
Joined: Wed Aug 21, 2002 3:25 pm
Contact:

Post by BarrieUK » Tue Jul 12, 2005 8:15 pm

This appears to be a problem in the database. I installed a new board on another part of my site and restored the database from the original forum and I have the same thing. Any ideas please?

sandodo
Registered User
Posts: 278
Joined: Mon Jul 19, 2004 7:13 am
Location: 11111111
Contact:

Post by sandodo » Wed Jul 13, 2005 3:44 am

you should check the MOD that will modify your admin_forumauth.php
My site - based on PHPBB
http://www.singapurate.com

Post Reply

Return to “[2.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 11 guests