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 to set Paypal button with a fixed target expiration date

s2Member Plugin. A Membership plugin for WordPress®.

How to set Paypal button with a fixed target expiration date

Postby pwallin » April 9th, 2011, 7:31 pm

I am setting up a membership site with an opening special - A one-time prepayment for membership through Dec 31, 2012. This is a significant discount over the monthly payment option.

I have set up my Paypal button for the monthly payment option.

Is there a way to create a Paypal button for the prepayment option? The price would be the same, whether someone signs up next week or 3 months from now. But all such subscriptions will expire on Dec 31, 2012.

If this is possible, I'll need to send out a notification in Nov 2012 to all prepayment subscribers, to renew at the 2013 rate in January 2013. Is there an automated way to do this?

Thanks.
Pauline
User avatar
pwallin
Registered User
Registered User
 
Posts: 64
Joined: April 2, 2011

Re: How to set Paypal button with a fixed target expiration

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

Hello Pauline. :)

I'm not sure if you want this to be a monthly payment or a payment in full until that date. Could you confirm?
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 to set Paypal button with a fixed target expiration

Postby pwallin » April 11th, 2011, 5:45 am

It would be a one-time prepayment in full, which is equivalent to 10 monthly payments. Everyone who chooses this option will have their subscription expire on Dec 31, 2012.

Thus, if one person joins today and another joins a month from now, they will both pay the same one-time fee; and both their subscriptions will expire on the same day (Dec 31, 2012).

So I'd like to make a Paypal button for that.

Ideally I'd also like to automate a notification near the time of expiration, alerting prepaid members that their subscription will automatically renew on Jan 1, 2013, but will switch to monthly payments.

I think I can send this notification through my aWeber account if I have the prepaid members in a separate list, even though they are at the same Level 1 as those who opted to pay the regular monthly fee.

Or does S2 member have this capability? If so, would it make sense to create a Level 2 membership (for prepaids) that has identical access as Level 1? That way it would be easy to identify who gets notified on Dec 31, 2012.
User avatar
pwallin
Registered User
Registered User
 
Posts: 64
Joined: April 2, 2011

Re: How to set Paypal button with a fixed target expiration

Postby lucjager » April 11th, 2011, 10:14 am

hi you should try this: (athleast it works for me)

1. Install the php execution plugin
2. add this above the pro forms in s2member:

Code: Select all
<?php
$now 
strtotime("now");
$fixed_time strtotime("31 December 2012");
$days_until_fixed_time round(($fixed_time $now) / ($seconds_in_one_day 86400));
?>


And use this code for the fixed date: Note place it in the rp="" and change tt="D" -> for days

Code: Select all
<?php echo $days_until_fixed_time?>


//*****Example*******\\
Code: Select all
[s2Member-Pro-PayPal-Form level="2" ccaps="" desc="your decription" ps="paypal" cc="EUR" ns="1" custom="yourdomain.nl" ta="0" tp="0" tt="D" ra="0.01" rp="<?php echo $days_until_fixed_time; ?>" rt="D" rr="BN" accept="paypal" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="US" captcha="0" /]
Last edited by Cristián Lávaque on April 12th, 2011, 2:11 am, edited 1 time in total.
Reason: Improve code readability. http://www.primothemes.com/forums/viewtopic.php?f=36&t=2780
User avatar
lucjager
Experienced User
Experienced User
 
Posts: 33
Joined: November 10, 2010

Re: How to set Paypal button with a fixed target expiration

Postby pwallin » April 11th, 2011, 11:57 am

Thanks. When you say "pro forms" do I need to have S2Member Pro?

And where would I find the pro forms? (Sorry for my ignorance. I'm new at this.)
User avatar
pwallin
Registered User
Registered User
 
Posts: 64
Joined: April 2, 2011

Re: How to set Paypal button with a fixed target expiration

Postby lucjager » April 11th, 2011, 12:03 pm

You should definly buy the pro forms because it looks much better on your site and the options for different payments gateways are much better!

If you enable the pro forms you see an extra option in the s2member option menu.

~ Luc
User avatar
lucjager
Experienced User
Experienced User
 
Posts: 33
Joined: November 10, 2010

Re: How to set Paypal button with a fixed target expiration

Postby Cristián Lávaque » April 12th, 2011, 7:11 pm

pwallin wrote:It would be a one-time prepayment in full, which is equivalent to 10 monthly payments. Everyone who chooses this option will have their subscription expire on Dec 31, 2012.

Thus, if one person joins today and another joins a month from now, they will both pay the same one-time fee; and both their subscriptions will expire on the same day (Dec 31, 2012).

So I'd like to make a Paypal button for that.


You could make a button where the trial is the time until the date you want (Dec 31, 2012) and the monthly payments kick in after that. You can use some code like the one Luc shared (thanks Luc!) to calculate the days left.

This post by Jason may help you, the difference with that example would be that you'd set the variable in the trial term attribute. viewtopic.php?f=4&t=2878&p=9025#p9025

You can customize the trial term like this when using the PayPal Pro-Forms that come with s2Member Pro. WP Admin -> s2Member -> PayPal Pro-Forms

pwallin wrote:Ideally I'd also like to automate a notification near the time of expiration, alerting prepaid members that their subscription will automatically renew on Jan 1, 2013, but will switch to monthly payments.

I think I can send this notification through my aWeber account if I have the prepaid members in a separate list, even though they are at the same Level 1 as those who opted to pay the regular monthly fee.

Or does S2 member have this capability? If so, would it make sense to create a Level 2 membership (for prepaids) that has identical access as Level 1? That way it would be easy to identify who gets notified on Dec 31, 2012.


Yeah, I'd do the notification with a server list like AWeber, s2Member doesn't have a built-in notification like that when near an EOT right now. WP Admin -> s2Member -> API / List Servers


I hope that helps. :)
Last edited by Jason Caldwell on April 12th, 2011, 9:22 pm, edited 1 time in total.
Reason: Minor typo is all.
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 to set Paypal button with a fixed target expiration

Postby pwallin » April 12th, 2011, 8:08 pm

Thanks Cristián. With S2member Pro, do I have to use Paypal Pro? I prefer to use Paypal standard, with the enhanced recurring billing option for subscribers who don't have or want a Paypal account.
User avatar
pwallin
Registered User
Registered User
 
Posts: 64
Joined: April 2, 2011

Re: How to set Paypal button with a fixed target expiration

Postby Cristián Lávaque » April 12th, 2011, 8:39 pm

You can use s2Member Pro's Pro-Forms with PayPal Standard, yes. What I'm not sure of is if PayPal Standard will accept the non-standard term for the trial.
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 to set Paypal button with a fixed target expiration

Postby Jason Caldwell » April 12th, 2011, 9:20 pm

Thanks for bringing this to my attention Cristián.
pwallin wrote:Thanks Cristián. With S2member Pro, do I have to use Paypal Pro? I prefer to use Paypal standard, with the enhanced recurring billing option for subscribers who don't have or want a Paypal account.

Sorry, in order to use Pro Forms in a way that does NOT require a Customer to have a PayPal account for recurring charges, you would need to have an actual PayPal Pro account. Highly recommended in general.

As described here, you do NOT need to have a PayPal Pro account to use Pro Forms. They can be used in combination with PayPal Express Checkout instead. However, this would require your Customers to have a PayPal account then, because the Express Checkout option does NOT take advantage of ERP ( Enhanced Recurring Payments ). Express Checkout is really intended as an option for Customers that prefer to pay with PayPal; and NOT as an all inclusive payment processing solution.

In other words, if you're currently paying for ERP, your next upgrade should be stepping up to PayPal Pro, and then you can ditch the ERP service all together. In fact, PayPal will not allow you to upgrade to PayPal Pro until you stop using ERP. These two services are mutually exclusive.

Sorry, but hopefully that clears up any confusion at least.
~ 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 to set Paypal button with a fixed target expiration

Postby Jason Caldwell » April 12th, 2011, 9:29 pm

pwallin wrote:It would be a one-time prepayment in full, which is equivalent to 10 monthly payments. Everyone who chooses this option will have their subscription expire on Dec 31, 2012.

Thus, if one person joins today and another joins a month from now, they will both pay the same one-time fee; and both their subscriptions will expire on the same day (Dec 31, 2012).

So I'd like to make a Paypal button for that.

Ideally I'd also like to automate a notification near the time of expiration, alerting prepaid members that their subscription will automatically renew on Jan 1, 2013, but will switch to monthly payments.

I think I can send this notification through my aWeber account if I have the prepaid members in a separate list, even though they are at the same Level 1 as those who opted to pay the regular monthly fee.

Or does S2 member have this capability? If so, would it make sense to create a Level 2 membership (for prepaids) that has identical access as Level 1? That way it would be easy to identify who gets notified on Dec 31, 2012.

I recommend the solution that I offered here.
( yes, this requires s2Member Pro, available here )

* Note. As Cristián mentioned, this *could* be made to work with PayPal Buttons too, but it gets really hairy, because with a PayPal Button, you're limited by restrictions to the number of days calculated in the rp="" Attribute. If that goes over 7 days, you have to change rt="" ( Recurring Term ) to W for weeks, or M for months, or Y for years. In other words, with Pro Forms, you can calculate everything in days, making it much easier to integrate this; but with Buttons, you'd need to calculate it out in very advanced ways.
~ 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: Google [Bot] and 2 guests

cron