Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-24T22:11:20-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2878 2011-11-24T22:11:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=53841#p53841 <![CDATA[Re: Fixed end of time (EOT)]]>
gemini6887 wrote:
I am having an issue which I believe is similar. I have a membership site that requires a 3 month recurring membership so I need the EOT to end at the 3 month mark. Unfortunately, s2 members doesn't offer that as a paypal option. I only have the option to continuously bill my customers even after the 3 month membership has ended. I have checked other forums and they explain how to create this button through paypal and integrate it with s2 member but it doesn't work properly.... :? customers don't receive their login details when I have to go through paypals buttons.

What do you suggest? Does s2 member pro offer this option?

Please help! This has been the only big problem with s2 member and I won't be able to continue to run my site with s2 members plugin unless I figure this out. Thanks for your help! :D

Actually, this is possible, even in the free version of s2Member; though it's not built into the basic UI panel for buttons, it is possible with a Shortcode Attribute. Please take a look in your Dashboard, under: PayPal Buttons -> Shortcode Attributes ( Explained ).

To answer your other question... yes, this is also possible in s2Member Pro.

( click to enlarge )
SNAG-0136.png

Statistics: Posted by Jason Caldwell — November 24th, 2011, 10:11 pm


]]>
2011-11-24T22:05:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=53840#p53840 <![CDATA[Re: Fixed end of time (EOT)]]>
man-O-media wrote:
So kind of a bump :)

I have been messing with
Code:
update_user_option (S2MEMBER_CURRENT_USER_ID, "s2member_auto_eot_time", $expire_on);
and setting the eot seems to work OK.

What I am trying to confirm is which action(s) are triggered by PayPal returning a sucessful payment and what the rest are for...
Setting the EOT Time yourself, forces s2Member to follow your EOT Time, regardless of what happens in the future. Payment notifications from PayPal will not change this.

However, there do exist two potentials exceptions to that rule. If you configure your s2Member EOT Behavior to force an immediate EOT upon a refund and/or chargeback reversal, s2Member will ignore your EOT Time, and immediately EOT the User in these two specific cases ( i.e. refunds/chargebacks ), but only if you configure your EOT Behavior in this way. For further details, check your Dashboard under: s2Member -> PayPal Options -> EOT Behavior.


In a perfect world, I will create a button for a one time buy now payment for a year term.
The person will click that and pay their $$ through PayPal and then, PayPal will report back to S2 that the 1 year payment was completed.
When that happens, my code is triggered to set that specific end date instead of the "1 year" associated with the button.
This is all correct. Your code should work as expected in this scenario.


As noted previously, I presume that
Code:
"ws_plugin__s2member_during_configure_user_registration_front_side
is essentially the same as
Code:
ws_plugin__s2member_during_configure_user_registration
but what does "front_side" mean?.
Front side indicates it's a User registering themselves on the front-side of your site, as opposed to *any* registration that occurs, which could perhaps be initiated on the back-side of a site, by a site administrator. You'll want to use the front_side variation.


Code:
ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars
does not seem relevant to my need but I am not sure.

And I presume
Code:
ws_plugin__s2member_during_paypal_notify_during_subscr_modify
is triggered when an existing paid subscription is active and it is somehow modified so I dont think I need it.

So bottom line, it does not look to me that any of these are appropriate for my needs. Which action(s) do I need in my scenario?
Use this one please:
Code:
ws_plugin__s2member_during_configure_user_registration_front_side

Statistics: Posted by Jason Caldwell — November 24th, 2011, 10:05 pm


]]>
2011-11-24T02:03:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=53777#p53777 <![CDATA[Re: Fixed end of time (EOT)]]> customers don't receive their login details when I have to go through paypals buttons.

What do you suggest? Does s2 member pro offer this option?

Please help! This has been the only big problem with s2 member and I won't be able to continue to run my site with s2 members plugin unless I figure this out. Thanks for your help! :D

Statistics: Posted by gemini6887 — November 24th, 2011, 2:03 am


]]>
2011-09-06T22:59:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=34167#p34167 <![CDATA[Re: Fixed end of time (EOT)]]>

I have been messing with
Code:
update_user_option (S2MEMBER_CURRENT_USER_ID, "s2member_auto_eot_time", $expire_on);
and setting the eot seems to work OK.

What I am trying to confirm is which action(s) are triggered by PayPal returning a sucessful payment and what the rest are for...

In a perfect world, I will create a button for a one time buy now payment for a year term.
The person will click that and pay their $$ through PayPal and then, PayPal will report back to S2 that the 1 year payment was completed.
When that happens, my code is triggered to set that specific end date instead of the "1 year" associated with the button.

As noted previously, I presume that
Code:
"ws_plugin__s2member_during_configure_user_registration_front_side
is essentially the same as
Code:
ws_plugin__s2member_during_configure_user_registration
but what does "front_side" mean?.

Code:
ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars
does not seem relevant to my need but I am not sure.

And I presume
Code:
ws_plugin__s2member_during_paypal_notify_during_subscr_modify
is triggered when an existing paid subscription is active and it is somehow modified so I dont think I need it.

So bottom line, it does not look to me that any of these are appropriate for my needs. Which action(s) do I need in my scenario?


Many thanks, DP

Statistics: Posted by man-O-media — September 6th, 2011, 10:59 pm


]]>
2011-09-02T23:41:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33850#p33850 <![CDATA[Re: Fixed end of time (EOT)]]>

Statistics: Posted by Cristián Lávaque — September 2nd, 2011, 11:41 pm


]]>
2011-09-02T23:24:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33846#p33846 <![CDATA[Re: Fixed end of time (EOT)]]>
Cristián Lávaque wrote:
Do you mean this hack? viewtopic.php?f=4&t=14384&p=30321#p30321
Well, you can just add more actions with the same function.

Yes indeed, the hack you helped me with...

What I am trying to confirm is which actions (or perhaps its all three of those and perhaps there are more?) are triggered by PayPal returning a sucessful payment and what the rest are for...

I presume that "ws_plugin__s2member_during_configure_user_registration_front_side" is essentially the same as ws_plugin__s2member_during_configure_user_registration' but I wonder what the "front_side" is all about.

I am not really sure what this one does: " ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars"

And I presume this is triggered when an existing paid subscription is active and it is somehow modified: "ws_plugin__s2member_during_paypal_notify_during_subscr_modify" and if that is the case I guess I don't need it as we will only be doing 1 year Buy Now payments.

So bottom line, which actions are triggered when there is a successful BuyNow payment?

Thanks, DP

Statistics: Posted by man-O-media — September 2nd, 2011, 11:24 pm


]]>
2011-09-02T21:46:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33820#p33820 <![CDATA[Re: Fixed end of time (EOT)]]> viewtopic.php?f=4&t=14384&p=30321#p30321

Well, you can just add more actions with the same function.

Statistics: Posted by Cristián Lávaque — September 2nd, 2011, 9:46 pm


]]>
2011-09-02T12:57:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33753#p33753 <![CDATA[Re: Fixed end of time (EOT)]]> http://www.primothemes.com/forums/viewtopic.php?f=4&t=10100&p=21701&hilit=reset+eot#p21726

It discuses adding actions to:
"ws_plugin__s2member_during_configure_user_registration_front_side"
"ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars"
"ws_plugin__s2member_during_paypal_notify_during_subscr_modify

I already add an action using: ws_plugin__s2member_during_configure_user_registration to set a default Jan 31 EOT which would have taken care of everything except that the EOT gets erased if someone is demoted.

Anyway, honestly, I cant see the forest for the trees in paypal-notify-in.inc.php but I would presume that an action can be triggered when it receives a confirmation from PayPal that the Buy Now payment was received and then, based on the month count originally sent with the PayPal Buy Now button or a new calculation, the "real" EOT could be generated and written.


Many thanks, DP

Statistics: Posted by man-O-media — September 2nd, 2011, 12:57 pm


]]>
2011-09-02T04:14:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33734#p33734 <![CDATA[Re: Fixed end of time (EOT)]]>
I am getting a bit of push back.
I have a function which gives me the months so I am pretty sure that will work but the desire is really to have the annual membership expire Jan 31st of each year, regardless of when members actually pay. And again, they could pay several months before the 1 year renewal date so counting days won't work.

I presume the actual EOT is written to the users database record after PayPal reports back to S2 that payment was a success.What is the EOT process and how difficult would it be to recalculate the EOT after payment is complete?

So for example the EOT could be recalculated based on the initial amount of months plus the number of days to get to the end of the month or, being as s2 doesn't have he same limits as PayPal, the EOT could be recalculated based on the number of days between now() and Jan 31st of the next year or what ever ?


DP

Statistics: Posted by man-O-media — September 2nd, 2011, 4:14 am


]]>
2011-08-31T19:32:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33539#p33539 <![CDATA[Re: Fixed end of time (EOT)]]>
24 months is more than enough and I only need a rough end date, give or take a week or two will be OK for what I need which will make the math much easier :D

I'm out of pocket for a few days but will get cracking on this when I get back as this is the last big thing that needs to happen before roll-out.

Many thanks.. DP

Statistics: Posted by man-O-media — August 31st, 2011, 7:32 pm


]]>
2011-08-30T23:24:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33473#p33473 <![CDATA[Re: Fixed end of time (EOT)]]> Thanks for the reply!

No, PayPal does not accept decimals, at least not to my knowledge.
I know of the following limitations for PayPal "Buttons", and I just checked the docs again and it looks like they've increased the limitation for days, now up to 90.

See: https://merchant.paypal.com/us/cgi-bin/ ... 8A6HI00JQU
D – for days; allowable range is 1 to 90
W – for weeks; allowable range is 1 to 52
M – for months; allowable range is 1 to 24
Y – for years; allowable range is 1 to 5

* s2Member will understand any of these, there are no limitations for s2Member itself. If were up to us, we'd allow 3000+ days. So as long as you can get the Button to work with PayPal, you're good. During your testing, if you do something that won't work with PayPal, you'll get an error immediately, right at that point where you reach PayPal checkout ( i.e. when you click the Button ).

Sorry, no. While it's true that s2Member Pro Forms will work with only PayPal Express Checkout; if you do that, all of your Customers are required to have a PayPal account, or be willing to sign up for one during checkout ( i.e. on-site credit card processing absolutely requires PayPal Pro ). That's the only reason I said, it's "best" to have PayPal Pro.

Statistics: Posted by Jason Caldwell — August 30th, 2011, 11:24 pm


]]>
2011-08-30T18:33:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33427#p33427 <![CDATA[Re: Fixed end of time (EOT)]]>
Jason Caldwell wrote:
If you integrate this with Buttons ( that is, if you manage that ), then no, you don't need to worry about PayPal Pro or any additional recurring services...

Right... And in terms of "managing" that, can I do for example, 17.5 or 18 months as a Buy Now?
And actually, perhaps a better question is, if I generate a 6 month Buy Now button and change the code to: rp="18" rt="M" and embed and click on the button. Does the fact that it sends me to PayPal mean that PayPal is OK with it? And will S2 be OK with 18 months?

However, if you choose to integrate this with s2Member Pro Forms, then yes; it's best to have a PayPal Pro account...
I don't mean to be a stickler but what do you mean "it's best to have a PayPal Pro account"?
I thought that Pro forms, except the free registration form, only work with a Pro account.
Is there a way (now) to use a Pro form for accepting credit cards that does not require a PayPal pro account and would not require the buyer to have a PayPal account?


Yes, the PHP Execution plugin allows you to incorporate PHP tags into your Shortcodes as well....

Cool!


DP

Statistics: Posted by man-O-media — August 30th, 2011, 6:33 pm


]]>
2011-08-30T18:07:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33412#p33412 <![CDATA[Re: Fixed end of time (EOT)]]>
If you integrate this with Buttons ( that is, if you manage that ), then no, you don't need to worry about PayPal Pro or any additional recurring services, because PayPal Standard ( i.e. Button integration ) is a completely free service provided by PayPal. However, if you choose to integrate this with s2Member Pro Forms, then yes; it's best to have a PayPal Pro account, and if you want to charge on a recurring basis, you would also need their Recurring Billing service as well. See: viewtopic.php?f=36&t=2634

Yes, the PHP Execution plugin allows you to incorporate PHP tags into your Shortcodes as well. For instance, here is an example usage that I posted awhile back: viewtopic.php?f=36&t=1604

Statistics: Posted by Jason Caldwell — August 30th, 2011, 6:07 pm


]]>
2011-08-30T17:55:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33408#p33408 <![CDATA[Re: Fixed end of time (EOT)]]>
Jason Caldwell wrote:
You could *try* this with Buttons, but it gets VERY hairy, because unlike s2Member's Pro Form integrations, PayPal requires your "Button" code to adhere to specific limitations they have at PayPal regarding a maximum number of days.

Yea, I get that and it indeed would require a bit of study and also brings up something I should confirm... As far as I know, Pro Forms are for on-site credit card processing which requires a PayPal Pro acct and can not be used in place of buttons for performing transactions on the PayPal site with a standard acct.
It would be cool though to be able to take the info into the form and push it into the PayPal site.

Anyway, my task is based on a year membership with an expiration at or near Jan 31.
The members can and sometimes do pay as early as October and as late as March for the year.

I do recall your video discussing particularly the PayPal number of days restriction but did not think much of it at the time :)
Judging by the button generator it seems that weeks are more flexible but still hit a wall at a year.
If someone renewed today; Aug 30 2011 to Jan 31 2012 is 22 weeks or about 5.5 months. Obviously I can't do 74 weeks. Can I do 17, 17.5 or 18 months as a Buy Now?
And is this even a discussion without having Recurring payments or a PayPalPro account?


The PHP code that I posted could go right inside your Post/Page that contains the Shortcode, but you will need to install the PHP Execution plugin for that to work. ... I recommend the PHP Execution route, because that keeps the variables confined only to the scope of the Shortcode, as it exists inside a particular Post/Page, thereby reducing your risk of creating a plugin conflict within WordPress.

Actually, I meant putting the code into the template file where you can fully execute php but actually, I like the idea of php exec so I could keep all the related code in one place.
Is PHP Execution fully compatible with all the shortcodes, meaning you can mix shortcodes and standard php?


Many thanks, DP

Statistics: Posted by man-O-media — August 30th, 2011, 5:55 pm


]]>
2011-08-30T15:49:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33379#p33379 <![CDATA[Re: Fixed end of time (EOT)]]> Thanks for the follow-up on this thread.

You could *try* this with Buttons, but it gets VERY hairy, because unlike s2Member's Pro Form integrations, PayPal requires your "Button" code to adhere to specific limitations they have at PayPal regarding a maximum number of days. In other words, if the calculation comes out to something like 35 days in your "Button" code, PayPal will hit you with an error, because the maximum number of "Days" they allow is 7; beyond that, they require that you move to using weeks/months instead. So, it IS possible, but you would need to change rp="35" and rt="D" to a Button-compatible configuration, make sense?

For instance, this WILL work with s2Member Pro Forms: rp="60" rt="D"
( because s2Member's Pro Forms will handle internal calculations of this dynamically )

But, for a PayPal "Button", they will require that you use: rp="2" rt="M" ( i.e. 2 months ).
( because Button codes result in a direct submission to PayPal, and you must adhere to PayPal rules )


And just as important, where can that "$days_until_fixed_time code" live?
Can I simply have it in the template for my form along with the rest or must it live in theme functions?

The PHP code that I posted could go right inside your Post/Page that contains the Shortcode, but you will need to install the PHP Execution plugin for that to work. Either that, or yes, it's fine to put that code inside your theme's functions.php file, or even create this file if you prefer:

/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
$now 
= strtotime("now");
$fixed_time = strtotime("30 April 2011");
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = 86400));
?>

* Note, although your PHP calculation code could go just about anywhere, I recommend the PHP Execution route, because that keeps the variables confined only to the scope of the Shortcode, as it exists inside a particular Post/Page, thereby reducing your risk of creating a plugin conflict within WordPress.

Statistics: Posted by Jason Caldwell — August 30th, 2011, 3:49 pm


]]>
2011-08-29T20:50:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=33315#p33315 <![CDATA[Re: Fixed end of time (EOT)]]>
Jason Caldwell wrote:
Yes, you can do something like this.
But this requires s2Member Pro Form integration.

Code:
<?php
$now 
= strtotime("now");
$fixed_time = strtotime("30 April 2011");
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = 86400));
?>

[s2Member-Pro-PayPal-Form ... ra="10.00" rp="<?php echo $days_until_fixed_time; ?>" rt="D" rr="BN" /]
* The Shortcode in this example has been abbreviated for clarity.

Hi Jason,

I would like to follow up on this question as I have the same issue... I have s2 pro however, can I do the same thing with s2 generated buttons instead of forms?
My plan is to have some if/else code combined into the template which I use for "My Profile" which will show specific text and specific membership pay buttons.

And just as important, where can that "$days_until_fixed_time code" live?
Can I simply have it in the template for my form along with the rest or must it live in theme functions?


Thanks, DP

Statistics: Posted by man-O-media — August 29th, 2011, 8:50 pm


]]>
2011-04-07T07:29:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=9258#p9258 <![CDATA[Re: Fixed end of time (EOT)]]> Thanks for reporting back Luc.

Statistics: Posted by Jason Caldwell — April 7th, 2011, 7:29 am


]]>
2011-04-04T05:20:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=9039#p9039 <![CDATA[Re: Fixed end of time (EOT)]]>
I'll let you know if it works, thanks for helping me so far!

~ Luc

Statistics: Posted by lucjager — April 4th, 2011, 5:20 am


]]>
2011-04-04T05:09:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=9036#p9036 <![CDATA[Re: Fixed end of time (EOT)]]> PayPal "Pro" is not absolutely
required to use PayPal Pro Forms.

Video
Take a look at the second video listed here,
regarding "Express Checkout".

viewtopic.php?f=4&t=304

Statistics: Posted by Jason Caldwell — April 4th, 2011, 5:09 am


]]>
2011-04-04T05:07:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=9035#p9035 <![CDATA[Re: Fixed end of time (EOT)]]>

p.s. is it possible to open an "paying" support part of the forum which is dedicated to the pro version of the plugin?

We'll certainly consider it. For now, all priority support is handled via email.
UPDATE. All support is now handled in our support forums ( here ).

Statistics: Posted by Jason Caldwell — April 4th, 2011, 5:07 am


]]>
2011-04-04T04:39:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=9029#p9029 <![CDATA[Re: Fixed end of time (EOT)]]>
I'll try this function in the pro forms,

p.s. is it possible to open an "paying" support part of the forum which is dedicated to the pro version of the plugin?

gr

Luc

Statistics: Posted by lucjager — April 4th, 2011, 4:39 am


]]>
2011-04-04T04:03:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=9025#p9025 <![CDATA[Re: Fixed end of time (EOT)]]> Thanks for an excellent question.
lucjager wrote:
If i am a custommer i registrer on 1 april 2011, but i would like to see that this account will be demoted to a free subscriber on a fixed date which i can set in the s2member button option like 23 april 2011.

Yes, you can do something like this.
But this requires s2Member Pro Form integration.

Code:
<?php
$now 
= strtotime("now");
$fixed_time = strtotime("30 April 2011");
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = 86400));
?>

[s2Member-Pro-PayPal-Form ... ra="10.00" rp="<?php echo $days_until_fixed_time; ?>" rt="D" rr="BN" /]
* The Shortcode in this example has been abbreviated for clarity.

Reference articles:

Variables in your Shortcode:
viewtopic.php?f=36&t=1604

PHP strtotime() function:
http://php.net/manual/en/function.strtotime.php

s2Member Pro Forms ( video intro ):
http://www.s2member.com/video-pro-intro/

Shortcode reference. Please check your WP Dashboard under:
s2Member -> PayPal Pro Forms -> Shortcode Attributes Explained

Statistics: Posted by Jason Caldwell — April 4th, 2011, 4:03 am


]]>
2011-03-30T21:20:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=8652#p8652 <![CDATA[Re: Fixed end of time (EOT)]]>
Maybe it won't take more than 30 days because then you'd normally use months... I don't know. Nothing stops you from trying it. :)

Statistics: Posted by Cristián Lávaque — March 30th, 2011, 9:20 pm


]]>
2011-03-30T17:31:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=8645#p8645 <![CDATA[Re: Fixed end of time (EOT)]]> but for now it is not needed,

just let me set the fixed date

thanks alot!!!

~Luc

Statistics: Posted by lucjager — March 30th, 2011, 5:31 pm


]]>
2011-03-30T17:05:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2878&p=8642#p8642 <![CDATA[Re: Fixed end of time (EOT)]]>
I will check how it could be done. One more question: Will those buying access on different dates, be charged according to the time they have left until that fixed date you set or they'll be charged the same regardless of how far or close to that date they are?

Statistics: Posted by Cristián Lávaque — March 30th, 2011, 5:05 pm


]]>