Tip: Avoid multiple free trial periods
Posted: July 12th, 2011, 2:07 pm
This is a scenario I've tested to avoid a hypothetical customer abuse case. It appears to work in sandbox testing, but any input on best practices or how to better handle this in the wild would be appreciated.
Scenario: My (hypothetical) service offers open registration (free Level 0) with premium subscription for Level 1 access. The (PayPal Standard) subscription offers a Free Trial Period, during which the user is Level 1, but has not yet paid. If the subscription lapses in payment (or is canceled), s2Member will demote the account back down to Level 0 (it is not desirable for my service to delete the account).
Problem: If a demoted user re-subscribes (back up to Level 1), they should not get another free trial. (If so, they could just keep canceling before the trial is over, then re-subscribing for more free time at Level 1.)
Solution: Call s2Member's s2member_paid_registration_time() to see if they have ever had a paid subscription. If so (this function returns non-zero), offer up a different PayPal button that does not provide a free trial period.
Details: Notice that s2Member does not (yet) provide shortcode for this method. I wrapped up some of this logic into my own function/shortcode (by modifying my theme's functions.php) to be called from my page content.
I hope this may be helpful to others. Feedback welcome.
Scenario: My (hypothetical) service offers open registration (free Level 0) with premium subscription for Level 1 access. The (PayPal Standard) subscription offers a Free Trial Period, during which the user is Level 1, but has not yet paid. If the subscription lapses in payment (or is canceled), s2Member will demote the account back down to Level 0 (it is not desirable for my service to delete the account).
Problem: If a demoted user re-subscribes (back up to Level 1), they should not get another free trial. (If so, they could just keep canceling before the trial is over, then re-subscribing for more free time at Level 1.)
Solution: Call s2Member's s2member_paid_registration_time() to see if they have ever had a paid subscription. If so (this function returns non-zero), offer up a different PayPal button that does not provide a free trial period.
Details: Notice that s2Member does not (yet) provide shortcode for this method. I wrapped up some of this logic into my own function/shortcode (by modifying my theme's functions.php) to be called from my page content.
I hope this may be helpful to others. Feedback welcome.