latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Conditional Paypal renewals

Home Forums Community Forum Conditional Paypal renewals

This topic contains 1 reply, has 2 voices. Last updated by  Raam Dev 4 years, 4 months ago.

Topic Author Topic
Posted: Monday Aug 13th, 2012 at 2:45 pm #21905
Josh Fonner
Username: roamlife

Hi folks, great plugin. Quick question: What would be the best way for me to set up registration renewals such that if a registered member doesn’t renew before their renewal deadline (e.g., Automatic EOT Time), they’ve have the option to renew late by paying a late fee? The logic would be something like this:

Current Date = ($currentDate)
Base registration price = ($registerPrice)
Get current registration deadline date ($registerDeadlineDate)

If $currentDate is later than $registerDeadlineDate;,
Registration price ($registerPrice) = (registration price */+ late fee ($lateFee));
where ($latefee can be some percentage of the registration price or a fixed amount),

echo $registerPrice;

where (price that will be charged for late registrations or late payment of membership fees can be both or either/or)

——————–

Thanks, any help would be greatly appreciated!

Jan C.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Aug 14th, 2012 at 9:25 am #21982
Raam Dev
Username: Raam
Staff Member

Hi Jan,

After a user EOTs, they are demoted (or deleted, depending on the configuration in Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior). Once they have been demoted, their Automatic EOT Time field is cleared, so there isn’t any way to know when the user originally EOTed.

However, if your late fee is a fixed amount (i.e., not calculated based on how long since their EOT), then you can simply create a “renewal page” (which would simply be an upgrade form using Dashboard -› s2Member® -› PayPal® Pro Forms -› Billing Modification Forms) that includes the late fee as the Initial amount so that the user is charged the extra amount the first month, but the regular amount every month thereafter.

You could use the s2Member Advanced Conditionals (see Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals) to check if the user is a Level 0 user with a S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME (see Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants) greater than 0.

If they are a Level 0 user and their Paid Registration Time is greater than 0, that means they’ve paid at some point in the past and they’ve been demoted to a Free Subscriber (Level 0). You can then present them with the upgrade form that includes the Late Fee.

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.