PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

How would non-recurring payments work?

s2Member Plugin. A Membership plugin for WordPress®.

How would non-recurring payments work?

Postby artEV » April 26th, 2011, 12:34 am

We are intending to create a membership-only tutorials website, with both free and paid membership tiers.
However, because recurring billing is generally not an accepted practice in our region, we will have to resort to one time payments. We will use Paypal Website Standard Payments (on a Premier account)

Our expected membership setup:
- Free for Bronze plan (granted access to select posts only)
- $10 for the Silver plan (each payment grants 30 days access to all posts)
- $20 for the Gold plan (each payment also grants 30 days access to all posts but with additional features on each post - will likely be enabled via custom capabilities)

My questions are:

1) What happens when a paying member nears his access expiration? We would of course want him to carry on as a paid member, but how does he go about making a new payment to extend his access?
And how is the new access duration calculated? E.g. he is 28 days into his Silver membership, and seeks to 'renew' another 30 days. Does he click the same Paypal button and gets another 30 days, bringing the total to 2 + 30 days? Also, does S2M support email notifications (automated or otherwise) for informing members who are nearing membership expiration?

2) Can Silver members easily upgrade to Gold? How is the new access duration calculated too? E.g. he is 15 days into his Silver membership but decides to go Gold. He sees the up-sell Gold option on his Silver member-page and hits the Paypal button to get Gold. Does it mean he now has 15 (silver) + 30 days (gold) access? Or it always only takes into consideration the most recent tier he is at?

3) Also, because individual $10 or $20 payments for 30 days access at each time might be a hassle for those who want a longer block of time to access the content, we might also include the option to pay for 3 & 6 months for both Silver and Gold respectively. So it will be something like:

Silver (3 months access) - $30
Silver (6 months access) - $60
and similarly for Gold - $60 & $120

Is it possible to have the user select a Silver option and then there is a drop down to select for what duration he would like to pay for at a go (1 month, 3 months, 6 months)?

4) Can paying members see a 'history record' of their payments on a members-page?

Hope someone could help to clarify. Many thanks in advance!
User avatar
artEV
Experienced User
Experienced User
 
Posts: 32
Joined: April 26, 2011

Re: How would non-recurring payments work?

Postby Cristián Lávaque » April 26th, 2011, 12:56 pm

I'll try to answer all your questions.

1) You could set him up with a subscription instead of one-time payments, then the billing would reoccur automatically.

If you work with one-time payments, adding more time to their membership before their EOT is up, will cause the previous one to end and the new one to start at the time of payment. This is something we're planning to improve, but in the meantime you can fix it with this trick:

Create this directory and file /wp-content/mu-plugins/s2-hacks.php. Inside the file, add this code. Be sure there are NO spaces or line breaks before or after <?php ?>

* This code is untested, but it should work fine. Please let me know if you have any trouble.

Code: Select all
<?php
add_action 
('ws_plugin__s2member_during_paypal_notify_during_before_subscr_signup_w_update_vars', 'during_before_subscr_signup_w_update_vars');
function during_before_subscr_signup_w_update_vars ($vars = array ())
{
    $GLOBALS['existing_s2_eot_time'] = get_user_option ('s2member_auto_eot_time', $vars['user_id']);
}

add_action ('ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars', 'during_subscr_signup_w_update_vars');
function during_subscr_signup_w_update_vars ($vars = array ())
{
    if (($eot_time = get_user_option ('s2member_auto_eot_time', $vars['user_id'])) && $GLOBALS['existing_s2_eot_time'])
        update_user_option ($user_id, 's2member_auto_eot_time', $eot_time + ($GLOBALS['existing_s2_eot_time'] - time ()));
}
?>


2) Yes. You'd use the modification button/form for your payment gateway, e.g. WP Admin -> s2Member -> PayPal Buttons -> PayPal Subscr Modification Buttons. I sent an email to the Lead Developer asking him how the remaining time is handled in this case.

3) You can use a quantity field in the HTML form. This thread may help you with that viewtopic.php?f=4&t=2860

4) This is not available in s2Member yet. For now your members can log into their PayPal account, for example, and look at their records there.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: How would non-recurring payments work?

Postby artEV » April 26th, 2011, 9:21 pm

Hi Cristian, thank you for your reply!

1) Yep, subscription would definitely be easier to manage but there have been many cases of sites/organizations getting sued in our region because recurring/automatic billing is frowned upon, so we don't want to take that risk. I will try out your suggested hack for one-time payments.

2) Will await Jason's feedback on this (re. EOT details)

3) Great lead, I'll look into implementing it that way!

4) Unfortunately, most of our members don't have Paypal accounts. They will only use their credit cards directly (without Paypal accounts). So there are no available shortcodes/scripts I could use to display their payment history at all? :(
User avatar
artEV
Experienced User
Experienced User
 
Posts: 32
Joined: April 26, 2011

Re: How would non-recurring payments work?

Postby Cristián Lávaque » April 26th, 2011, 10:26 pm

You're welcome. :)

artEV wrote:4) Unfortunately, most of our members don't have Paypal accounts. They will only use their credit cards directly (without Paypal accounts). So there are no available shortcodes/scripts I could use to display their payment history at all? :(


No, I'm sorry there isn't one at the moment. Maybe the other gateway you'll use also has a payment history available to them? :|
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: How would non-recurring payments work?

Postby artEV » May 1st, 2011, 11:26 am

Any chance at taking a look at point 2, given mine are all simply Buy-now memberships (non-recurring, non-subscription)?

Also, for the quick fix solution provided for point 1, does it matter that I don't have MU WP running? (do I need to just put the file in /wp-content/plugins?)

We're in need to clarify how the payment would work, before we can launch, hence the urgency. Appreciate it!
User avatar
artEV
Experienced User
Experienced User
 
Posts: 32
Joined: April 26, 2011

Re: How would non-recurring payments work?

Postby Cristián Lávaque » May 1st, 2011, 7:09 pm

OK, here's what I have regarding question on EOT when upgrading with PayPal Standard:

Subscriptions

The modification process takes place at PayPal, and PayPal's policy is to process the modification instantly, but billing does not change until the next billing date of the original subscription plan.

For instance, if a Customer is paying monthly at $24.95/mo for Level #1 Access, and then they upgrade to Level #2 at $49.00/mo, here is how its handled.

- s2Member automatically upgrades them to Level #2 membership immediately after modification is completed at PayPal.
- PayPal will charge them $49 on the next recurring payment.

Buy Now

In this case, the EOT Time is what controls their length of access, because there is no Subscription plan established at PayPal (i.e. it's a Buy Now transaction). So in this case, the upgrade/downgrade just configures the Membership Access at whatever the Button is configured for.

We need to improve this because the EOT Time needs to be incremented instead of reset to a completely new value. You'll need a hack similar to the one suggested for question (1).


Rearding the mu-plugins directory, mu stands for "must use", it doesn't have to do with WP MU (multisite).

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: How would non-recurring payments work?

Postby artEV » May 1st, 2011, 10:26 pm

Cristián Lávaque wrote:Buy Now
We need to improve this because the EOT Time needs to be incremented instead of reset to a completely new value. You'll need a hack similar to the one suggested for question (1).


Thanks for reverting Cristian.
Is the above code sufficient to cover both scenarios? If not, how would the code be needed to change in order to handle both of my Buy Now scenarios?

My 2 scenarios being: (i) user purchases an extension of current plan whilst current EOT still not up & (ii) user purchases an upgrade (higher level plan) whilst a lower level plan is still in effect (EOT for current plan not up)

I'm assuming here that extending and/or upgrading plans when a user's existing EOT is UP, will not be a problem - since S2M sees it as a 'new' purchase and not an extension/upgrade. Please correct me on this point is I'm wrong.
User avatar
artEV
Experienced User
Experienced User
 
Posts: 32
Joined: April 26, 2011

Re: How would non-recurring payments work?

Postby Jason Caldwell » May 3rd, 2011, 10:42 pm

artEV wrote:4) Unfortunately, most of our members don't have Paypal accounts. They will only use their credit cards directly (without Paypal accounts). So there are no available shortcodes/scripts I could use to display their payment history at all? :(

Not exactly what you're looking for, but this might help you some.
viewtopic.php?f=36&t=2793&p=8226#p8227
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: How would non-recurring payments work?

Postby Jason Caldwell » May 3rd, 2011, 10:51 pm

artEV wrote:Is the above code sufficient to cover both scenarios? If not, how would the code be needed to change in order to handle both of my Buy Now scenarios?

My 2 scenarios being: (i) user purchases an extension of current plan whilst current EOT still not up & (ii) user purchases an upgrade (higher level plan) whilst a lower level plan is still in effect (EOT for current plan not up)

I'm assuming here that extending and/or upgrading plans when a user's existing EOT is UP, will not be a problem - since S2M sees it as a 'new' purchase and not an extension/upgrade. Please correct me on this point is I'm wrong.

I *think* the answer to your question is yes. Using the code/hack that Cristián provided you with should work nicely. But just to be clear, that code snippet will always extend the amount of time, in either case. If the Customer already has an account, and the existing time is not yet expired, s2Member would add more time to whatever they have remaining, with either scenario ( if the hack is in place ).

In other words, this hack does not care whether it's an upgrade/downgrade/etc. It just takes whatever time they have remaining, and "adds" more time, based on what they are now purchasing. If I was a Customer on your site, and I have 2 days remaining, then I pay for another year, after checkout, this hack would allow me 2 days + 1 year = 367 days total now remaining.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: How would non-recurring payments work?

Postby artEV » May 3rd, 2011, 10:55 pm

Thanks for your reply Jason (and the lead with regards to account history).

So in upgrade situations, adding of time to the EOT is exactly what I want but would the EOT be a 'total amount of time' for the higher level access?

E.g. half a month prior to Silver access expiring, a user upgrades to Gold (Buy-now 1 month).
His EOT would then be 1 month + 15 days (from previous remaining) - 45 days of Gold access?
Or would the system be smart enough to know its just 15 days Silver and subsequently 30 days Gold?
User avatar
artEV
Experienced User
Experienced User
 
Posts: 32
Joined: April 26, 2011

Re: How would non-recurring payments work?

Postby Jason Caldwell » May 3rd, 2011, 11:04 pm

You're very welcome.
artEV wrote:Or would the system be smart enough to know its just 15 days Silver and subsequently 30 days Gold?

Sorry, no. That's not possible yet. It would be a total of 45 days at the Gold Level. Each Membership is associated with ONE specific Level. So upgrading would add the time, but that time would then be associated with the Level they are now at going forward, and not with any Level they had previously.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: How would non-recurring payments work?

Postby artEV » May 3rd, 2011, 11:09 pm

Hmm but then again, it makes more sense to allow the user immediate Gold access :D. Still, some site administrators might want the choice to choose between how it is handled.
I look forward to seeing improvements to how non-recurring payments are handled in future releases.

This pretty much clarifies my doubts on this one-off payment extensions/upgrades, thanks Jason/Cristian!
Now time to throw in more conditionals here & there, and finally LAUNCH! Woot! :D
User avatar
artEV
Experienced User
Experienced User
 
Posts: 32
Joined: April 26, 2011

Re: How would non-recurring payments work?

Postby Cristián Lávaque » May 3rd, 2011, 11:49 pm

You could probably create a custom hack that, in the case of an upgrade, the time left gets converted into money towards the new level: level1_time -> money -> level2_time.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: How would non-recurring payments work?

Postby Jason Caldwell » June 5th, 2011, 9:07 pm

Cristián Lávaque wrote:
Code: Select all
<?php
add_action 
('ws_plugin__s2member_during_paypal_notify_during_before_subscr_signup_w_update_vars', 'during_before_subscr_signup_w_update_vars');
function during_before_subscr_signup_w_update_vars ($vars = array ())
{
    $GLOBALS['existing_s2_eot_time'] = get_user_option ('s2member_auto_eot_time', $vars['user_id']);
}

add_action ('ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars', 'during_subscr_signup_w_update_vars');
function during_subscr_signup_w_update_vars ($vars = array ())
{
    if (($eot_time = get_user_option ('s2member_auto_eot_time', $vars['user_id'])) && $GLOBALS['existing_s2_eot_time'])
        update_user_option ($user_id, 's2member_auto_eot_time', $eot_time + ($GLOBALS['existing_s2_eot_time'] - time ()));
}
?>

This hack no longer needed. This was addressed in the official release of s2Member v110605+.
@TODO: Extension of EOT Time whenever a Customer is upgrading a paid Subscription.
( done, screenshot attached )
SNAG-0000.png
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: How would non-recurring payments work?

Postby artEV » June 5th, 2011, 9:36 pm

Awesome sauce, upgraded!! :D
User avatar
artEV
Experienced User
Experienced User
 
Posts: 32
Joined: April 26, 2011

Re: How would non-recurring payments work?

Postby drbyte » July 24th, 2011, 10:02 pm

Hi Guys

Not sure if it's a bug or might be some configuration on my side..here's the short code

[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="$4.99 USD / One Time ( for 3 day access, non-recurring )" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.site.com" ta="0" tp="0" tt="D" ra="4.99" rp="3" rt="D" rr="0" rrt="" rra="0" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

Got lots of registration but what I do not understand why there is no ETO time to any of them. How S2M know when to demote them to free subscribers when the 3 days is over?

Thanks

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: How would non-recurring payments work?

Postby Jason Caldwell » July 24th, 2011, 10:32 pm

Hi Sam. Thanks for the great question.

When your PayPal Form is configured as a "Subscription", s2Member uses a PayPal Pro Recurring Profile ( even if it's actually a non-recurring charge, it still goes into the system that way ), so the EOT is determined by PayPal, according to the Recurring Profile configuration dictated by your Shortcode. The EOT occurs on the PayPal side, and PayPal will notify s2Member via IPN when that occurs. At that time, s2Member will set the EOT Time within your Dashboard. In short, a Recurring Profile puts the ball in PayPal's court, and s2Member just listens in ( unless you configure an EOT manually in the mean time, but that's completely optional; not required ).

If you would like s2Member to set and handle the EOT all by itself, immediately during checkout, you can regenerate your Shortcode as "Buy Now" instead of as a "Subscription".
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: How would non-recurring payments work?

Postby drbyte » July 25th, 2011, 12:11 am

Hi Jason...Thank you

I will keep my eyes on those transactions...and report back

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: How would non-recurring payments work?

Postby drbyte » July 28th, 2011, 2:10 am

Hi Jason

I have 6 transactions that is 4 days old and has not been demoted or canceled. The ETO is still blank. Do we have to manually cancel or demote the membership if we use the One Time ( for X day access, non-recurring )?

Access days: 3 Days
Transactions date: July 23th, 2011


Thank you

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: How would non-recurring payments work?

Postby Jason Caldwell » August 2nd, 2011, 9:25 pm

Thanks for the follow-up Sam.
~ I apologize for the delayed response.
drbyte wrote:Hi Jason

I have 6 transactions that is 4 days old and has not been demoted or canceled. The ETO is still blank. Do we have to manually cancel or demote the membership if we use the One Time ( for X day access, non-recurring )?

Access days: 3 Days
Transactions date: July 23th, 2011


Thank you

Sam
No, you should NOT need to enter those manually. An EOT Time should be set immediately after checkout is completed when it's for fixed-term access, because s2Member will know ahead of time the exact date on which access should be denied. If it's not working this way for you, something is very wrong. The only case in which s2Member would NOT set an EOT Time for a Buy Now purchase with a fixed-term, is when the fixed term is for Lifetime access ( which would be the expected behavior ). If this problem continues, can you please post a copy of your Shortcode along with any details we need to reproduce this issue?
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: How would non-recurring payments work?

Postby drbyte » August 2nd, 2011, 11:16 pm

Hi Jason..NP

Yes, none of the 6 membership had any ETO expiration time. The code I used was

[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="$4.99 USD / One Time ( for 3 day access, non-recurring )" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.site.com" ta="0" tp="0" tt="D" ra="4.99" rp="3" rt="D" rr="0" rrt="" rra="0" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

I even waited couple of extra days just in case there was a time difference between servers and countries

I had to demote them manually one by one . I'm using now the buy button for the one time option. It's working fine and it's populating the ETO filed with the correct data.

As far for the code above, not sure why it's not working. I suppose it's set to charge one time only then full access for life.

Thanks
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: How would non-recurring payments work?

Postby Jason Caldwell » August 2nd, 2011, 11:25 pm

I see what the problem is. When you generate your Pro Form Shortcode, be sure to scroll all the way in the drop-down box, into the "Buy Now" options. Your Shortcode should then be generated with rr="BN", which will give you the behavior that you're looking for.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests

cron