Free Trial getting downgraded

According to the gateway-core-ipn.log this was a subscriber cancellation from PayPal:

LOG ENTRY: Fri Apr 7th, 2017 @ precisely 4:45 pm UTC
PHP v5.6.30-0+deb8u1 :: WordPress v4.7.3 :: s2Member v170221 :: s2Member Pro v170221
Memory 16.10 MB :: Real Memory 17.00 MB :: Peak Memory 19.79 MB :: Real Peak Memory 20.75 MB
www.semantica-portuguese.com/?s2member_paypal_notify=1
User-Agent: s2Member v170221; https://www.semantica-portuguese.com
Array
(
    [txn_type] => subscr_cancel
    [subscr_id] => RP0000003179
    [custom] => www.semantica-portuguese.com
    [period1] => 1 D
    [period3] => 6 M
    [payer_email] => jameshall-6-month-4@semantica-portuguese.com
    [first_name] => james
    [last_name] => hall
    [option_name1] => Originating Domain
    [option_selection1] => www.semantica-portuguese.com
    [option_name2] => Customer IP Address
    [option_selection2] => 68.0.140.45
    [item_number] => 1:freetrial
    [item_name] => 1 Day free / then FULL access for 6 months
    [proxy_verified] => paypal
    [s2member_log] => Array
        (
            [0] => IPN received on: Fri Apr 7, 2017 4:45:46 pm UTC
            [1] => s2Member POST vars verified with a Proxy Key
            [2] => s2Member originating domain (`$_SERVER["HTTP_HOST"]`) validated.
            [3] => s2Member `txn_type` identified as ( `subscr_cancel|recurring_payment_profile_cancel|mp_cancel` ).
            [4] => Auto-EOT Time for this account: Fri Apr 7, 2017 4:22 pm UTC
            [5] => Cancellation Notification Emails have been processed.
        )

    [subscr_gateway] => paypal
    [subscr_baid] => RP0000003179
    [subscr_cid] => RP0000003179
    [ccaps] => freetrial
    [level] => 1
    [ip] => 68.0.140.45
    [s2member_paypal_proxy] => paypal
    [s2member_paypal_proxy_use] => pro-emails
    [s2member_paypal_proxy_verification] => df906692b147b9a90850466e8d880e04
)

You have a LOT of cancellations in that log. I only saw 1 that was due to payment failure, but that was not a thorough cross-check of the logs, just a quick look.

s2Member demoted the User because PayPal sent a transaction saying the User had canceled.

I did cross-check 3 users between gateway-core-ipn and auto-eot-system and, for those 3, each EOT action had a corresponding cancellation transaction from PayPal. PayPal is sending cancellation transactions and s2Member is processing them. If your Users are not canceling at PayPal then you need to find out why PayPal is sending those transactions. I think it highly unlikely that s2Member is creating these log entries out of thin air nor do I think this is caused by any kind of theme/plugin conflict.

Thanks for checking this out, Pat.

We have a real mystery here since this cancellation was not from any user action. Every test membership gets mysteriously cancelled. At least we now know that it’s a cancellation and nothing else. Now the question becomes:

What could cause an automatic cancellation?

~James

That would usually be a funding issue, e.g. credit card expired, no or changed paypal account, etc

The logs I have sent are related to a test purchase — from an account that I control - my money etc. I did not cancel. The cc is in good standing. I’ve done this many times. It’s none of these issues.

All (100%) of new accounts since we started offering a free trial (several weeks ago) are being demoted automatically — it’s not a funding issue for all of these people. I can see the payments made in PP — all of them go through fine. No refunds etc.

The point is that PayPal thinks you did cancel. So actually, yes, it is one of those issues. You need to ask PayPal why it thinks that.

Thanks Tim.

When I talk to PP should I be telling them that their api is sending us premature cancel orders? I’m just not sure how to say what’s happening accurately, do you?

That is exactly what I would tell them. If you Google, you will see that this has happened with PayPal before, though apparently not with s2Member.

But expect to have to press the point. PayPal is a real PITA to deal with in many ways. I moved to Stripe years ago.

Pat - the RP profile is assigned temporarily just for the trial, right? (this is a non-recurring sale). How does the RP profile normally get “cancelled” ?

No. The rp is the Regular Period for the subscription. It has nothing to do with the trial period. You always need the attributes that start with r.

A subscription can be canceled from PayPal by you or the Subscriber. It can be canceled with a cancellation form on your site. Finally, it can be canceled at PayPal for non-payment: bad credit card info, credit card declined, something else happened when PayPal submitted payment…

Since you are using a 1 Day free trial and your subscriptions are being canceled at the end of the day, something is happening at PayPal when the payment is submitted.

There is one possibility I hadn’t thought of before: Have you changed the Grace Period (PayPal Options → EOT Grace Time**) for the EOT to 0? If so, it is possible that s2Member is canceling as soon as the trial expires. I don’t know why there would be a log entry from PayPal, but it could be that the trial is expiring before PayPal can submit the payment info via IPN.

1 Like

This is happening to all of the purchases made on the site — they normally have a 7 day trial period — the 1 day is just for my testing. The grace period is set for 86400 seconds.

By “RP” I was talking about the profile ID — before the trial I noticed that IDs that had “RPxxxxx” were only for recurring profile subs. It seems now that even purchasers of the 6 month product get assigned an RPxxxx as well now. I think this RP goes away at end of trial. Could that be causing a cancel notice to get sent?

I don’t think so. I think it has to do with rra="0" which means that the subscription is canceled if payment fails just once for any reason. I think there is something going on at PayPal and the payments are failing and the subscriptions are being canceled. As I said, PayPal is telling s2Member that the subscriptions were canceled, not the other way around.

do you have a soluution, this is interesting for me, too

This is looking more and more like an s2m bug.

Here’s why:

PP doesn’t send anything on its own apart from first payment and cancel if it is user initiated. I see S2 as a monitor basically. S2 regularly makes calls to PP to get the status of the profile and if PP says that the profile is expired then S2 does its job.

So if we break this down:

  • User fills out the S2 payment form
  • S2 form has the required HTML tags that PP needs based on one time payment, recurring, how many days and so on… (this is where I think the mistake might be)
  • User pays on paypal site
  • PP creates profile or one time payment based on what the S2 member sends.
  • After payment, PP sends notification to the site.

Then what happens for recurring:

  • S2 regularly makes calls to PP to see what the actual status is in case of recurring.
  • If status active, S2 does nothing.
  • If status expired, S2 demotes it.

Then what happens for TRIAL OF A NON-RECURRING PRODUCT:

  • this is where I’m stumped! a RP is clearly created for all non-recurring products IF it has a trial. This profile is killed off when trial is over. Then PP sends the CANCEL and then my users freak out and send angry email.

Can you elaborate on what’s supposed to happen here, Pat?

Thanks, James

No solution yet. Do you any experience with this issue Yomma?

no no experience iam just interrested

Not really. I know just enough to check the logs to see what is happening. I don’t know in what order things are done.

I have submitted a GitHub Issue on this here: https://github.com/websharks/s2member/issues/1077.

You wrote a very good summary on Git - thanks!

I’m a little skeptical that this is going to find a resolution on github - do you know how to get the attention of Jason or people that work directly (paid) for the plugin?

Best, James

Github is the best place to get their attention, but they will delete anything that isn’t related to programming: bug reports or feature requests, in other words. As I said in the GHI, I’m almost convinced this is a bug too.

@jhall_3rd I received your submission and the heads up on this thread. I will respond to you shortly via s2Member support.

Thank you everyone. This is now a confirmed bug. A fix has been prepared for the next release and a short-term patch has been posted here with instructions: https://github.com/websharks/s2member/issues/1077#issuecomment-295581510

1 Like