Expired membership subscriptions retain access

We were under the impression that a Member who purchases a subscription will have a membership level only until that level expiry date passes.

A year ago we began selling year long subscriptions via a slightly customized version of the PayPal Express Gateway. Now these subscriptions are coming up for renewal. For users who have not cancelled or turned off the auto-renewal, PayPal will send us an IPN notifying us that they have received payment at the end of the year when the subscription comes due. With this IPN, when it hits our Gateway, we then drop the subscription and create a new one.

However, for users who have cancelled or turned off the auto-renewal via PayPal, we will not get a subscription payment IPN from PayPal. When we log in with a user that has the subscription with an expiry date in the past, that user still has access. Is there a configuration setting we missed while setting up these subscriptions? Does membership require that we manually drop these subscriptions? How does the user ultimately lose Membership Level access?

We are logging all IPNs from PayPal in our customized version of the PayPal Express Gateway, so we have a history to work with.

Thanks in advance.

  • aecnu
    • WP Unicorn

    Greetings Fool,

    Sorry to see that you are having issues with the subscriptions and though it used to be that when one cancelled there subscription from within PayPal the IPN was received by Membership and their membership was cancelled on the spot.

    I do not know if this was coded out? You mentioned that the gateway has been custom coded?

    Alternatively, if the member cancelled within the Membership plugin area the membership ran until the end and was cancelled.

    Considering everything mentioned herein, what version of the membership plugin are you running?

    Or are you indeed running the newest version Membership 3.4 RC 1?

    Please advise.

    Cheers, Joe

  • Fool
    • Flash Drive

    Joe,

    I've been looking through the membership plugin code, and it appears that expirydate is not used to determine membership access. I only see references where the membership_relationships table is queried for by sub_id or level_id with no inclusion of a where clause such as "where expirydate < CURDATE()". This leads me to believe that code needs to run to DELETE the associated row in this table for MEMBERSHIP LEVEL ACCESS to be turned off.

    Could you verify this for me?

    Best,
    The Motley Fool

  • aecnu
    • WP Unicorn

    Greetings The Motley Fool,

    Thank you for the additional clarification and for digging into this a bit.

    I will refer this ticket over to the lead developer of the Membership plugin since if this is indeed the case as you have described which is not enforcing expiration, it is ultimately the lead developer that will need to make the applicable adjustment for all to benefit from.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Fool
    • Flash Drive

    Joe,

    Thanks for reaching out to the lead developer. In the meantime we may code up a wp cron to update the level (from paid member to free visitor) for subscriptions that have an expiry date in the past.

    Please keep us in the loop with what the lead developer recommends.

    Best,
    The Motley Fool

  • aecnu
    • WP Unicorn

    Greetings The Motley Fool,

    Just touching base with you to see if you have indeed updated to Membership version 3.4 since it is now mainstream and if this has by any chance resolved the expiring issue?

    I do not know the gateway you are using but in the past I know if using PayPal if the member killed the subscription on the PayPal side when the IPN came into Membership it would kill the subscription on the spot. But if the member used the cancellation within membership then it ran until expiration.

    As we await lead developer input here in this ticket I thought it a good idea to touch base with you over these other items.

    Please advise if indeed we are now working with version 3.4

    Cheers, Joe

  • Fool
    • Flash Drive

    Joe,

    We are not on 3.4, but on 3.3. I have looked at the differences in the code and I don't think anything has changed on the gateway side of things, so I am fairly certain an upgrade to 3.4 would have no affect.

    I did do some digging and verified that folks with expiring subscriptions fall into one of three buckets.

    1. A "subscr_cancel" IPN has been sent from PayPal when a user cancels or we cancel for them from within PayPal. Membership sets a UserMeta key '_membership_expire_next' value to the subscription id and the next time the user logs in, the subscription is removed. I believe this is the functionality you eluded to earlier in this thread.

    2. A subscription that has been granted to a user using 'admin', will continue to exists. I will need to write a cron to periodically clean these up as far as I can tell.

    3. A subscription that fails to renew from PayPal will eventually trigger PayPal to send an IPN of type 'recurring_payment_suspended_due_to_max_failed_paym'. Again, I will need to write a cron to clean these up as far as I can tell.

    Could you verify with the Lead Developer that I'm on the right track here?

    Best and Happy New Year,
    The Motley Fool

  • aecnu
    • WP Unicorn

    Greetings The Motley Fool,

    Thank you for taking the time to submit all the additional information regarding the coding.

    Indeed my flag to the lead developer still stands form a month ago though due to the holidays etc. it is possible that it got away form him.

    I shall try again.

    Thank you for your kind demonstrated patience.

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.