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.

I do not understand how a Modif-on Form work

Home Forums Community Forum I do not understand how a Modif-on Form work

This topic contains 19 replies, has 4 voices. Last updated by  Jason (Lead Developer) 3 years, 9 months ago.

Topic Author Topic
Posted: Wednesday Feb 27th, 2013 at 10:28 am #43326

Hello!

We have two plans:
$ 7 / month
$ 50 for the first 2 years and then $ 50 / year

When the user selects $50 plan, he paid the full $50 for the first two years.
What happens if he decides to update its plan for $ 7 a month?
Will he get back the $ 50? If not, when it will begin to pay $ 7 a month, after 2 years? After the expiration of the first plan?

If the user cancels their subscription for $ 50 he will have access to the end of the subscription term? But if he decides to make another $ 50 subscription, he will lose the first $ 50?

List Of Topic Replies

Viewing 19 replies - 1 through 19 (of 19 total)
Author Replies
Author Replies
Posted: Friday Mar 1st, 2013 at 9:08 am #43471

Hi Dmitry.

When the user selects $50 plan, he paid the full $50 for the first two years.
What happens if he decides to update its plan for $ 7 a month?

The previous subscription would end and the new one would start.

Will he get back the $ 50? If not, when it will begin to pay $ 7 a month, after 2 years? After the expiration of the first plan?

No, won’t. You’d need to customize the pro-form he’s changing his subscription with, to take into account the time he has left from the 2 years, and enter that as an initial free term so that the monthly $7 payments start being charged after that. Knowledge Base » Using Variables In A Shortcode

If the user cancels their subscription for $ 50 he will have access to the end of the subscription term? But if he decides to make another $ 50 subscription, he will lose the first $ 50?

Right, if he cancels he’d still have access until his paid time runs out.

Yes, if he pays the $50 dls subscription again, it’d reset the subscription. You’d need to adjust the pro-form’s shortcode as I mentioned before to give keep the paid time he’s got left. Knowledge Base » Using Variables In A Shortcode

Buy Now transactions (not subscriptions) can add time to the paid time he already has. You’ll find the setting for that here: [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior -> Fixed-Term Extensions[/hilite]


I hope that helps. :)

Posted: Friday Mar 1st, 2013 at 2:17 pm #43523

Thanks for the reply!

Please tell me, how can I get the time that remains until the end of the user’s account in case he makes modification and in case he had previously made cancellation?

Posted: Saturday Mar 2nd, 2013 at 9:37 am #43605

Well, if the EOT time is set, you can get it with [hilite mono]get_user_field[/hilite]. http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

[hilite pre_code]
$s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time"); # Auto EOT-Time for the current User (when applicable).
[/hilite]

Keep in mind that subscriptions don’t set the EOT time before they end. Only buy-now sets the EOT time immediately. So if it’s a subscription you’ll need to figure out the time left, based on the time since it started and the length of the terms. The docs here may be helpful for this: [hilite path]Dashboard -› s2Member® -› API / Scripting -› Content Dripping[/hilite].

Also, you may be able to get some ideas from this hack: http://www.s2member.com/forums/topic/setting-up-eot-notifications/

Also, remember you’ll be working with Unix timestamps, so you may find useful the [hilite mono]date[/hilite] and [hilite mono]strtotime[/hilite] functions. http://php.net/date http://php.net/strtotime

I hope that helps. :)

Posted: Saturday Mar 2nd, 2013 at 10:27 am #43618

As I understand, s2Member user meta value s2member_auto_eot_time sets after unsubscribing?
Okay, let’s assume the user bought a subscription for 2 years and then made the cancellation. s2member_auto_eot_time will be set as the end of the subscription, right?

But then if the user buys something through buy-now for 1 year?
If the user buys something through buy-now for 3 years?
What will be s2member_auto_eot_time value in this case?

———-

What if I have only Lavels and subscription time may depending on various promotions held on the site (1year, 2 year…), how can I get the length of the terms that a user has a subscription?

Posted: Tuesday Mar 5th, 2013 at 8:34 am #43764

Hi Dmitry.

Okay, let’s assume the user bought a subscription for 2 years and then made the cancellation. s2member_auto_eot_time will be set as the end of the subscription, right?

Right. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior[/hilite]

[note_box]
s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system (based on your configuration). s2Member also calculates one extra day (24 hours) into its equation, just to make sure access is not removed sooner than a Customer might expect.
[/note_box]

But then if the user buys something through buy-now for 1 year?
If the user buys something through buy-now for 3 years?
What will be s2member_auto_eot_time value in this case?

Then the EOT is set at the time of purchase, there’s not subscription to cancel since they’re buy-now. If the user purchases more than one buy-now, then the new purchased time is added to the previous one based on the Auto Extend setting: [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior -> Fixed-Term Extensions[/hilite]

What if I have only Lavels and subscription time may depending on various promotions held on the site (1year, 2 year…), how can I get the length of the terms that a user has a subscription?

If the EOT time is set, you can get it with get_user_field. http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29


I hope that helps. :)

You can figure out since when the user has had a certain level. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Content Dripping[/hilite]

Posted: Tuesday Mar 5th, 2013 at 8:54 am #43766

Hi!

If the user cancels his subscription and EOT has value set the end of the year, then made a Buy Now for two years, how will I know EOT of subscription that has been canceled?

What if I have only Lavels and subscription time may depending on various promotions held on the site (1year, 2 year…), how can I get the length of the terms that a user has a subscription?

If the EOT time is set, you can get it with get_user_field. http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

But if the EOT is not set, how can I get it?

Posted: Thursday Mar 7th, 2013 at 5:28 pm #43995

If the user cancels his subscription and EOT has value set the end of the year, then made a Buy Now for two years, how will I know EOT of subscription that has been canceled?

Currently these times are not saved as a history, whatever the current EOT time is will overwrite the previous one. If you need to store these, you could use a notification together with a custom script to save them. [hilite path]Dashboard -› s2Member® -› API / Notifications -› Cancellation Notifications[/hilite]

But if the EOT is not set, how can I get it?

You’d need to figure it out from the last payment time plus the period you sell, that’s what I’d try to do. So if last payment was on Mar 1 and you charge monthly, you can guess EOT would be Apr 1. Something like:

[hilite pre_code]
$estimated_eot_time = get_user_field('s2member_last_payment_time') + (date('t') * 24 * 60 * 60);
[/hilite]

http://php.net/date
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

I hope that helps. :)

Posted: Friday Mar 8th, 2013 at 1:58 pm #44113

I hope that helps. :)

No, it does not help. :(
I’m sorry, but you did not answer my question. Every time I have to wait 2 days to hear what I have read several times on your forum and the responses above.

My question is clearly:
How can I know EOT if the EOT do not have value and I do not know the subscription period?

I’m sorry, I can not wait for one year to check how the algorithm that I should write work. If I make a mistake, my clients or I will lose money. I do not know how your plugin work and it is difficult to deal with it. I think that your plugin should perform such a basic procedure.

Please send me the code that I have to install that will work correctly.

The second question:

Currently these times are not saved as a history, whatever the current EOT time is will overwrite the previous one. If you need to store these, you could use a notification together with a custom script to save them.

Please send me the code that I have to install that will work correctly.

Please do not make me repeat the same question over and over again.

Posted: Saturday Mar 9th, 2013 at 1:08 am #44139

In the user page there is a column “registration date”. If you know when they paid and you know the level of subscription then it should be possible to make that calculation.
You can extract the user registration date with code like:

<?php echo date("l d M Y", strtotime(get_userdata(get_current_user_id( ))->user_registered)); ?>

Play around a bit with the date() function and read the WordPress Manual on this.

You can easily extract the user level with

<?php $user_info = get_userdata(1);
      $the_user_level = $user_info->user_level;
?>

Basically, your request for s2members to create the code for you is beyond their allowed support (unless you pay for it of course.)

So you can ask the same Q over and over again but consider this.
There is nothing wrong with some trial and error and make your own experience grow. That is the way you will find all work-arounds and in the process you might become an expert.
As I once said on a totally different forum:

An expert is a person who made every possible mistake in a very restricted area of expertise (and found all work-arounds).

Posted: Saturday Mar 9th, 2013 at 5:02 am #44144

boudewijn lutgerink, you carefully read my questions?

I bought a plugin. In advertising has been written that it supports the ability to unsubscribe and modify subscriptions. But in fact, these functions do not work. Plugin developers offer me finish myself these basic features.

I do not want to become an expert in how your plugin work. I just do not want any trouble that you plugin can deliver to me. I want to install it and forget it.

Please do not make me repeat the same question over and over again. Just give me a clear answer, which I have to do to get everything working as it should.

Posted: Tuesday Mar 12th, 2013 at 3:15 am #44335

How can I know EOT if the EOT do not have value and I do not know the subscription period?

I’m sorry, I had not understood from your previous posts that you don’t know the subscription period for the user.

You could try writing a hack that connects to PayPal’s API to find out. This post may help: http://www.s2member.com/forums/topic/last-payment-time-is-wrong/#post-28491

Please send me the code that I have to install that will work correctly.

I’m sorry: s2Member® » Support Policy » Outside Scope.

In advertising has been written that it supports the ability to unsubscribe and modify subscriptions.

You can using the subscription cancellation and modification buttons/pro-forms.

I do not want to become an expert in how your plugin work. I just do not want any trouble that you plugin can deliver to me. I want to install it and forget it.

If you’re doing something supported by s2Member, of course it’s simpler than if you want to customize the way it works.

If you need to customize something to behave in a certain way that isn’t the default, and you don’t know how to do it yourself, you can hire a freelancer experienced in these things. There are several freelancer sites where you can try posting your job, like: jobs.wordpress.net, odesk.com, elance.com, freelancer.com.

boudewijn lutgerink said:

Basically, your request for s2members to create the code for you is beyond their allowed support (unless you pay for it of course.)

Boudewijn, I just wanted to clarify that we don’t do paid customization jobs either.

Oh, and thanks very much for your help and support. :)

Posted: Tuesday Mar 12th, 2013 at 4:36 am #44341

You can using the subscription cancellation and modification buttons/pro-forms.

Suppose a site user has made a subscription for a year and paid $ 1,000, and then a month later he decided to make modifications and decided to pay $ 200 a month. The user automatically loses $ 900. Do you really think that your plugin has the function of modifying subscriptions?
Your plugin does not do basic functions and you do not provide any technical support …

If you need to customize something to behave in a certain way that isn’t the default, and you don’t know how to do it yourself, you can hire a freelancer experienced in these things. There are several freelancer sites where you can try posting your job, like: jobs.wordpress.net, odesk.com, elance.com, freelancer.com.

I’ve already paid for your plugin, now I have to pay to the one who will make your work?

Link that you wrote to me: http://www.s2member.com/forums/topic/last-payment-time-is-wrong/#post-28491
Is this also works for Payflow, or do I need a different code for a Payflow?

Currently these times are not saved as a history, whatever the current EOT time is will overwrite the previous one. If you need to store these, you could use a notification together with a custom script to save them. Dashboard -› s2Member® -› API / Notifications -› Cancellation Notifications

I do not see anything about EOT in Cancellation Notifications. How can I get EOT with Cancellation Notifications?

Posted: Wednesday Mar 13th, 2013 at 3:42 pm #44525

Suppose a site user has made a subscription for a year and paid $ 1,000, and then a month later he decided to make modifications and decided to pay $ 200 a month. The user automatically loses $ 900. Do you really think that your plugin has the function of modifying subscriptions?

PayPal itself doesn’t allow to change the terms of an existing subscription, so to “change” it it needs to be replaced with a new one. Since s2Member doesn’t know the EOT of the existing subscription, it can’t figure out the paid time left.

For this kind of change, you’d have to use a bit of PHP to estimate the time the user has left (similar to the need to have EOT notifications) and add it to the shortcode’s initial term without charge, so the next regular payment of the new subscription happens after the already paid time. Knowledge Base » Using Variables In A Shortcode

Is this also works for Payflow, or do I need a different code for a Payflow?

I don’t understand the question.

I do not see anything about EOT in Cancellation Notifications. How can I get EOT with Cancellation Notifications?

If I’m not mistaken, it could notify a hack that uses the [hilite mono]wp_loaded[/hilite] hook and then check the EOT time with [hilite mono]get_user_field[/hilite].
Knowledge Base » Hacking s2Member® Via Hooks/Filters
http://adambrown.info/p/wp_hooks/hook/wp_loaded
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

I’ll ask Jason to confirm this.

Posted: Wednesday Mar 13th, 2013 at 4:36 pm #44532

PayPal itself doesn’t allow to change the terms of an existing subscription, so to “change” it it needs to be replaced with a new one. Since s2Member doesn’t know the EOT of the existing subscription, it can’t figure out the paid time left.

For this kind of change, you’d have to use a bit of PHP to estimate the time the user has left (similar to the need to have EOT notifications) and add it to the shortcode’s initial term without charge, so the next regular payment of the new subscription happens after the already paid time. Knowledge Base » Using Variables In A Shortcode

I understand that I need to add the remaining days of the current subscription to the beginning of the new subscription.

But if your plugin simply gave the following data:
1. The number of days (or date) of the next payment for the current level.
2. EOT for Buy Now.
3. EOT (if the user cancel your subscription) for the current level.
(2 and 3 – should be in different variables. It is very bad that one value removes other.)

It would be much simpler.

—————

Of course, I can make a request directly to Paypal, but modify subscription form is opened with a delay (5-10 seconds, while there is a call to Paypal).
Plus, if Paypal will change settings, my script will work correctly (I will have all the time to control it myself).
Plus, I’m not sure that my script will work correctly in all cases (and you does not want to give correct the script).

————–

All these issues say that your plugin does not do functions that expects.

—————

Is this also works for Payflow, or do I need a different code for a Payflow?

I don’t understand the question.

http://www.s2member.com/kb/paypal-account-types/

2. PayPal Pro (PayFlow Edition) (aka: PayPal® Payments Pro) – this is what s2Member supports with respect to PayFlow. This type of account offers both of the API flavors. You can integrate with the PayPal Pro API, or with the PayFlow API.

If I sign up for PayPal Pro (PayFlow Edition) , is this API request will work without any modifications?
http://www.s2member.com/forums/topic/last-payment-time-is-wrong/#post-28491
Or do I need to use PayFlow API? Why use two different API? Paypal is going to transfer its service to PayFlow API?

If I’m not mistaken, it could notify a hack that uses the wp-loaded hook and then check the EOT time with get_user_field.
Knowledge Base » Hacking s2Member® Via Hooks/Filters
https://mail.google.com/mail/u/0/?shva=1#search/wp_loaded
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

I can see only $s2member_auto_eot_time = get_user_field (“s2member_auto_eot_time”);
But how can I know is this EOT for current lavel ot it is EOT for Buy Now?
How do I know EOT for the current level to which you have access, not Buy Now EOT?

Posted: Thursday Mar 14th, 2013 at 4:50 am #44581

If I sign up for PayPal Pro (PayFlow Edition) , is this API request will work without any modifications?

No, it’ll be the same with Express Checkout or PayPal Pro, you’d still need to calculate the paid time left and adjust the subscription’s initial term with it in the pro-form’s shortcode.

But how can I know is this EOT for current lavel ot it is EOT for Buy Now?

You can’t, right now there’s only one EOT time. When selling a combination of subscription with buy-nows, the only way to not have the EOT problem would be if the buy-nows were selling lifetime (without EOT) custom capabilities and adjusting the Auto EOT Behavior so ccaps aren’t removed when the level is demoted to 0. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior -> Membership EOTs also Remove all Custom Capabilities[/hilite]

But if your plugin simply gave the following data:
1. The number of days (or date) of the next payment for the current level.
2. EOT for Buy Now.
3. EOT (if the user cancel your subscription) for the current level.
(2 and 3 – should be in different variables. It is very bad that one value removes other.)

It would be much simpler.

That’s very true, we’re aware of the current limitations. All these will not be a problem in the new s2Member we’re developing, but it’s still not ready and we don’t have a release date yet.

Posted: Monday Mar 18th, 2013 at 5:41 am #45039

Error

Posted: Thursday Mar 21st, 2013 at 9:09 am #45333
Staff Member

Thanks for the heads up on this thread :-)

Regarding Subscription Modifications Buttons/Forms generated with s2Member®
Buttons (PayPal® Standard)

With PayPal Standard “Buttons”, a Modification is handled mostly on the PayPal side of things. There are details about this process at the PayPal website, and in the s2Member® documentation built into your Dashboard. The short version goes something like this…

Dashboard -› s2Member® -› PayPal Buttons -› Modification Buttons
*Modification Process* When you send a Member to PayPal® using a Subscription Modification Button, PayPal® will ask them to login. Once they’re logged in, instead of being able to signup for a new Membership, PayPal® will provide them with the ability to upgrade and/or downgrade their existing Membership with you, by allowing them to switch to the Membership Plan that was specified in the Subscription Modification Button. PayPal® handles this nicely, and you’ll be happy to know that s2Member has been pre-configured to deal with this scenario as well, so that everything remains automated. Their Membership Access Level will either be promoted, or demoted, based on the actions they took at PayPal® during the modification process. Once an existing Member completes their Subscription Modification at PayPal®, they’ll be brought back to their Login Welcome Page, instead of to the registration screen.
The rules regarding when/what is used in the next billing cycle, after an upgrade occurs; is left entirely up to PayPal’s system. The techniques they use are discussed here.
Further discussion here and here (really, in several places online).
See also: Dashboard -› s2Member® -› PayPal® Buttons -› Subscr. Modification Buttons


Pro Forms (s2Member® Pro w/ PayPal® Pro Integration)

See: Dashboard -› s2Member® -› PayPal® Pro Forms -› Billing Modification Forms

s2Member® -› PayPal® Pro Forms -› Billing Modification Forms
If you’d like to give your Members (and/or your Free Subscribers) the ability to change (modify) their billing plan; you can generate a new PayPal® Modification Form here. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Form available to Members who are logged into their existing account with you. For example, you might want to insert a “Level #2” Upgrade link into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan.

*Modification Process* Very simple. A Member clicks a link to a special Post/Page, which contains a Modification Form you’ve generated. The Member fills in their billing information. After a successful form submission, s2Member will update the status of their account to the Level, pricing, and terms that you configure below. If the Member already has an existing paid Subscription with you, that paid Subscription will be cancelled automatically behind-the-scene, and a new paid Subscription will be created to replace the old one. Again, the new paid Subscription is based on the Level, pricing, and terms that you specify below. If you need to give Customers some sort of grace period when/if they upgrade to a more expensive plan, please feel free to handle this through the application of free days, or with special pricing configured in your Modification Pro Form.

*Integrating Conditionals* Since each Modification Form is configured for a specific Level, you may want to create multiple Modification Forms, one for each combination you intend to make available. s2Member’s API Conditionals can help you display the proper Form to each Customer, based on the status of their existing account. For further details, see: Dashboard -› s2Member -› API Scripting.

*Independent Custom Capabilities* If you just want to sell an existing Member new Custom Capabilities, without affecting their paid Subscription in any way, please see: Dashboard -› s2Member® -› PayPal® Pro Forms -› Capability (Buy Now) Forms. Independent Capability Forms facilitate Buy Now functionality, specifically for Custom Capabilities, without affecting the Customer’s primary Subscription and Membership Level Access.


The original question posted in this thread…

Dmitry Sandal wrote…

Hello!

We have two plans:
$ 7 / month
$ 50 for the first 2 years and then $ 50 / year

When the user selects $50 plan, he paid the full $50 for the first two years.
What happens if he decides to update its plan for $ 7 a month?
Will he get back the $ 50? If not, when it will begin to pay $ 7 a month, after 2 years? After the expiration of the first plan?

If the user cancels their subscription for $ 50 he will have access to the end of the subscription term? But if he decides to make another $ 50 subscription, he will lose the first $ 50?

When the user selects $50 plan, he paid the full $50 for the first two years.
What happens if he decides to update its plan for $ 7 a month?

When you generate your Modification Pro Form, you will need to grant the customer two free years (e.g. what the customer already paid you for); and then have the new billing start at $7/month moving forward beyond those 2 years they’ve already paid you for.

If the user cancels their subscription for $ 50 he will have access to the end of the subscription term?

Yes, the customer would continue to have access (even after cancelling);
for a full two years they have already paid you for. Please see this section of your Dashboard for further details/documentation on this behavior. Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior

But if he decides to make another $ 50 subscription, he will lose the first $ 50?

Yes, this is possible, because if they purchase again, it wipes out their existing EOT Time, and allows them to start fresh on your site under the terms of their most recent purchase with you. s2Member® does NOT support multiple simultaneous subscriptions for any single customer.

I’m not sure I would term it “loses the original $50”, but I suppose that could happen, depending upon what the customer purchases next (i.e. what your site offers on that next purchase). If your site is providing access to something (normally the case with s2Member); the original $50 may have granted them access to something that their second purchase does not. It could happen, yes.

However, I’m not sure I follow you here completely. If this is happening on your site, you might want sell Custom Capabilities to existing customers instead of completely changing their primary Subscription.

In either case, this type of behavior is not something s2Member® will support natively, because s2Member® does NOT support multiple simultaneous subscriptions for any single customer. When one ends, we deal with the EOT Time for that one. If a new one takes it’s place; we’re now dealing only with the new one (e.g. the customer starts fresh under the terms of their most recent purchase).

Regarding time/date/amount calculations…

I noticed some discussion about this above. While it’s fine to do this (if you want to get very specific about things); this is NOT something that s2Member® will handle for you in any automated way; and this is by design. There are simply too many variables to consider; and too many business models in which one approach may work nicely, while another would handle the situation horribly.

There are also some important limitations on the PayPal® side of things that can prevent s2Member® from handling every possible scenario perfectly; IF we tried to update an existing Recurring Profile in an automated way. Such as raising the dollar amount or changing the frequency of billing; to which there are limitations imposed by PayPal®. This is why s2Member® Pro will actually terminate the previous Recurring Profile and replace it with a new one (to circumvent issues with the PayPal® Pro API when it comes to things like this). An s2Member® Pro Modification replaces the previous Recurring Billing with a new one; very simple. The new terms are dictated by the configuration of your Modification Pro Form. No limitations this way :-)

The point is this. Instead of making these decisions for you, we provide you with the tools you need to determine the proper course of action; depending on the customer; depending on the site, or on any number of other factors.

In most cases, it is NOT necessary to perform any advanced calculations. You can simply round things off in a way that is fair to both you and the customer. However, if you want to get specific, s2Member® stores the Last Payment Time for each customer for you; and this is a good way to calculate things like this. If you know the existing billing schedule, and you know the Last Payment Time; you can decide how many free days to give them, and make any advanced payment calculations that you’d like to make.

$s2member_last_payment_time = get_user_field ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.

See also: http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field()

It is also possible to query the PayPal® Pro API (where billing details reside — at PayPal); and gain access to every possible detail related to their existing Billing Profile with you.
Example using this technique to acquire every possible detail…
<?php
$user_id = get_current_user_ID();
$subscr_id = get_user_option('s2member_subscr_id', $user_id);

if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response (array('METHOD' => 'GetRecurringPaymentsProfileDetails', 'PROFILEID' => $subscr_id))) && !$paypal['__error'])
	print_r($paypal); // Gives you a full array of details.
?>

Further details here: https://www.s2member.com/forums/topic/last-payment-time-is-wrong/#post-28491

The $paypal variable will contain the following details, as documented by PayPal. This was pulled from the PayPal API docs, which are provided to you in your s2Member.com account. Upon logging in at s2Member.com, go to the My Account page, and download the s2m-pro-extras.zip file. Inside the zip file, you’ll find this information in the file: paypal-pro-api.pdf and/or payflow-pro-rec-api.pdf


The important thing to note, is this…
A Member clicks a link to a special Post/Page, which contains a Modification Form you’ve generated. The Member fills in their billing information. After a successful form submission, s2Member will update the status of their account to the Level, pricing, and terms that you configure in the Modification Pro Form.

If the Member already has an existing paid Subscription with you, that paid Subscription will be cancelled automatically behind-the-scene, and a new paid Subscription will be created to replace the old one.

Again, the new paid Subscription is based on the Level, pricing, and terms that you specify in the Modification Pro Form.

And please remember that it’s always possible for advanced site owners to perform their own calculations and inject custom variables into a Shortcode.
<?php
$initial_period_days = 365 * 2; // Two years.
$new_monthly_amount = 7.00; // $7.00/monthly.

echo do_shortcode('&#91;&#91;s2Member-Pro-PayPal-Form tp="'.$free_days.'" tt="D" ta="0.00" rp="30" rt="D" ra="'.$new_monthly_amount.'" ... /&#93;&#93;');
?>

See also: Knowledge Base » Using Variables In A Shortcode
See also: Dashboard -› s2Member® -› PayPal® Pro Forms -› Shortcode Attributes (Explained)

Posted: Thursday Mar 21st, 2013 at 9:29 am #45338

Hello Jason,

Thanks for the answers. But you did not really answer my questions … : (
Do I need to ask them again?

All that you have written, I have read previously in different topics on your forum… But you do not answer my questions. It’s been a very long time, and there is no result. : (
Every time I have to wait 2 days to hear what I have read several times on your forum. It’s sad, I had lost hope to get support from your side…

Posted: Thursday Mar 21st, 2013 at 9:42 am #45341
Staff Member

Thanks for your reply :-)

No, that is not necessary. Closing this topic.
I feel we have explained this thoroughly for you already.
Viewing 19 replies - 1 through 19 (of 19 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.