Paid Access Component Questions.

Michieal ~ Coder ~ Posted in Component Development 4 years ago

So, I have a question about the Paid Access Component. I've purchased it, and I want to have the ability to make some users free, based on an If() condition so that I can have free users and paid users.
I don't wish to go through and "mark paid" in the user lists.
So, I need to know how to do something akin to this:

if (Free User condition == true){
    display regular site access
} else {
    display PAID ACCESS paywall
}

How would I go about doing this?

Thank you!

Replies
us Michieal ~ Coder ~ Replied 4 years ago

@Arsalan,

Here's more along the lines of what I need....

$user = ossn_user_by_guid(1);
if ($user->paid_access_paid == false) {
   if ($user->data->access == 'free'){
      // this is what I need: The code to show the site itself
   } else {
      //fall through to regular 'pay us' wall 
   }

I hope that illustrates it better than what I initially asked.

us Michieal ~ Coder ~ Replied 4 years ago

Awesome, thank you.
What shows the normal site? I know that "(REF)" shows the 404 error page.

Also, what time period does the paid access component renew on? We're doing a monthly subscription... Or, does it receive the paypal / stripe ipn ping back saying that the subscription didn't renew?

Indonesian Arsalan Shah Replied 4 years ago

.

$user = ossn_user_by_guid(1);
if($user->paid_access_paid  == true){
 // your stuff.
}

.