Member was set to "expired" before Stripe could process payment

A member was activated on 3/22/16 and expired on 4/21/16. However, in Stripe, an invoice was initiated and paid on 4/22/16. In Membership 2, the member's status is pending (activate on next payment), but the latest payment in Stripe did not reactivate the member in Membership 2.

The latest version of the plugin is installed, and support access is open.

  • Adam Czajczyk

    Hello Scott,

    I hope you're well today and thank you for your question!

    I have accessed your site and reviewed Membership 2 Pro logs but I think I'll need to investigate it a bit more. I checked the member that you noted in "WPMU DEV -> Support" support note field but there were clearly no other transactions for this user than two initial ones (February and March). Is this the member you're referring to in your question for sure? I may be missing something here so please provide me with as much details as possible on this.

    I have also found some transactions for other members (e.g. id 1740) where there were payment attempts made past due date but I suppose this is not a case here.

    There's however a setting that's often causing issues like this one. That said, please access your Stripe dashboard and then go to "Your account -> Account settings -> General" page and make sure that the "Timezone" setting is matching exactly the "Time Zone" settings of your WordPress install (on site's dashboard "Settings -> General Settings" page). The difference may cause "de-synchronized" transactions that wouldn't then be handled well by Membership 2 Pro.

    Looking forward for your replay,
    Adam

  • Milan

    Hello Scott

    Hope you are well today. ?

    To test this better with latest version, I've created one dummy daily recurring membership on my sandbox site. ( Daily is the minimum period I can set :slight_smile: ) I have subscribed few dummy users to that Daily Recurring membership and I will get back to you with states I find on my end.

    Hopefully this will help us to eliminate possibility of bug here.
    Cheers,
    Milan

  • Milan

    Hello Scott

    Hope you are well today and sorry for being late on this !

    Remember I told you that I have setup testing cycle for this in my this post https://premium.wpmudev.org/forums/topic/member-was-set-to-expired-before-stripe-could-process-payment#post-1071859, this test has replicated issue on my sandbox site too. I've flagged developer for this one, Hopefully they will take a look at this issue real soon, Meantime I will ask for temporary hotfix and if I get any I will update you here. We appreciate your patience.

    Cheers,
    Milan

  • Adam Czajczyk

    Hello Scott!

    As much as I'd love to provide you with a fix right away it seems we'll need to wait for developers response and this often takes a bit longer than our replay here on support forum.

    I really hope this will be fixed very soon as it's crucial issue. Please keep an eye on this thread and also make sure that you keep the plugin updated as soon as an updated is published.

    Kind regards,
    Adam

  • Adam Czajczyk

    Hello Scott!

    Right now, we have paid members who can't access the site. Is there a way to reactivate them so they can login and view paid-for content?

    You could do this either by revoking membership and then granting it again for these members or by going to "Membership 2 -> All Members -> [Subscription details for selected member]" and switching "Status" option in "Manage Subscription" details to active.

    The latter can also be achieved by clicking on the blue "profile" icon (last item on the right) for a member on "All Members" members list and then switching member's status.

    I'd however suggest another way as both solution above would most likely require members to re-subscribe once the issue is fixed. In order to avoid changing their current settings you could therefore grant them "temporary" membership:

    - create a membership(s) that's exactly the same in terms of Protection Rules as the one(s) they signed up for
    - set this membership "free" and "private" (so members won't be charged but also nobody will be able to signup for it to "trick" the system)
    - assign it to those members as an additional membership (not removing their current one).

    This way they'll gain access to the content while their current memberships remain intact. Once the issue is fixed you could then simply delete temporary membership(s) - there'll be no need to edit members' memberships or protection rules then.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Scott!

    I'm a bit surprised that the dates were changed for existing memberships. They shouldn't be as each membership is a separate membership and "lives by its own rythm". This screenshots however suggest that you actually changed membership for this member instead of adding a new one. That is, if I'm seeing the whole picture and reading it correctly.

    Have you already did this for all members? If not, please go to "Membership 2 -> Add-ons" page and double-check that the "Multiple memberships" add-on is enabled/active. This should result in new membership being added as a secondary membership not affecting the original one in anyway.

    Kind regards,
    Adam

  • Adam Czajczyk

    Hello Scott!

    Take a look at the screenshot below please:

    This image shows a "Subscription details" screen for a member that's a member of two memberships. The "VIP" membership is a paid membership that user signed up for and was charged via PayPal and the "Membership manager" is a free subscription that I manually assigned to this member. As you can see there are two memberships shown on this screen and there are different start/expiration dates. The dates for "VIP" membership are as they were automatically assigned during user signup and the dates for "Membership Manager" are also assigned automatically at the time I added this membership.

    With "Multiple Memberships" add-on enabled (which is enabled on your site, as you say) all it takes to add new memembership to an existing member is to go to "Membership 2 -> All members" page and clicking in a row next to the assigned membership label, then selecting additional membership. This can also be done "in bulk" on the same page by selecting all members on a page and then choosing "Add membership: [selected membership]" from the "Bulk Actions" drop-down list.

    I'm guessing that instead you used "Subscription details" (edit member shown on your screenshot) screen to set membership and the membership got switched. However if that's not a case, can I have another look at your site to review current state and see what may have happened there? I'd need to access the site via support access so could you please grant it for me (it seems it have expired)?

    Best regards,
    Adam

  • Predrag Dubajic

    Hi Scott,

    I did some tests on my installation as well and even though I could replicate same Stripe issue as Milan did I was unable to replicate the issue with changing one membership to affect another.

    Can you tell me which date was set for your paid membership, I can see on the screenshot that this status is also set to public and if you have set that as active you need to have future date selected or the plugin will revert it back to pending.

    Best regards,
    Predrag

  • Scott

    The only dates I made note of was on the last member I added the free membership to, and that's because I noticed that the start and expiration dates had changed on the other members. The screenshots above show a direct before/after of adding the "complimentary membership" to each member per Adam's suggestion in paragraph 2 above. As I mentioned in my previous post, user ID 489 can be used for testing. That user needs to be deleted, but make use of the account to validate this bug before I delete it. Support access is open due to separate ticket with this plugin, so please use that. You'll be able to directly check member logs which should be helpful in this case.

  • Milan

    Hello Scott

    Hope you are well today :slight_smile:

    Members with user IDs 696, 697, & 701 are now on the expired list yet fully paid in Stripe.

    I suggest you do it this on your own and adjust date according to these member's Stripe preference. I don't know on exactly which date they have repaid in Stripe. So best person to conduct this change is you. :slight_smile:

    Please feel free to conduct it. Moreover We have these affected members ids so our developer will look at it, thanks for this additional info too.

    Cheers,
    Milan

  • Scott

    Milan, I think you missed point here. Actually, Adam suggested that I give these members access to a free membership while the plugin and Stripe renewal date bug is resolved. When I followed his instructions, it changed the start and expiration dates of the expired membership level to match the newly granted free membership. This is bug #2 further complicating bug #1 on this thread.

    When Predrag needed more information, I suggested testing and replicating the date bug on a real user/member who later would be deleted. This was WPMU Dev's opportunity to get real-world information for tracking down these bugs. I need to grant free access to users 696, 697, & 701 today. When I do that, the start and expiration dates for their original paid membership WILL change. I am offering WPMU Dev an opportunity to replicate this bug by performing the process for yourselves. If you are not interested in the logs and data for fixing this bug, then I will update them myself. Just let me know if you are interested in the added data.

  • Predrag Dubajic

    Hi Scott,

    Apologies about that, it quite hard getting all the points from this thread if you don't read each comment carefully or multiple times :slight_smile:

    I assigned free membership to member 696 and can see the issue on your site but I'm still unable to replicate it on my installation, since Milan was testing payment as well I will check with him to try the same thing on his installation, perhaps he will have more luck in replicating this so we could provide devs with as much info as possible.

    Best regards,
    Predrag

  • Milan

    Scott

    You are right, that process should be automatic but unfortunately due to bug with Stripe Payment gateway it is not happening on your end.

    We are very well aware about this bug and our developers are working hard to resolve this. We just need some more time on this please. Please cooperate. Hope you will.

    I've again flagged our developer for this with note of criticality. Hopefully this time it will be quick.

    Kind Regards,
    Milan

  • Milan

    Hello Scott

    Finally our developer has concluded bug report this these words. :slight_smile:

    Basically we only do M2 -> Stripe communication.
    Stripe never sends data to M2 on its own.

    When a subscription expires in M2, we go and ask Stripe: "Can you extend the subscription?" If stripe says something like "No, could not get the money", or "No, could not find that customer" then we cancel it in M2.

    So please test with latest update ( the one you just installed ) and if it does not work, So first thing I can recommend is to enable a debugging flag on the installation:

    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    This will log all stripe errors to the file wp-content/debug.log. After the next subscription is cancelled, we should have some stripe error details in the log file, like "Stripe customer is empty" or "Stripe error: ..."

    With this information we are able to check what is going on
    Best Regards,
    Milan

  • Dimitris

    Hey there Scott,

    hope you're doing good today! :slight_smile:

    I wasn't able to locate any server details of yours, apart from the support access you've kindly granted for us. Could you please send these to us so our devs can have a better look inside?
    As this is public forum, you should send us your details through our safe contact form https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: "Attn: Dimitris"
    - WordPress admin (login url/username/password)
    - FTP credentials (host/username/password)
    - cPanel/Plesk credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Keep in mind the subject line as ensures that it gets assigned to me.

    Warm regards,
    Dimitris