Hi!
This is what seems to happen:
-
User Subscribes / Upgrades / Resubscribes / Reupgrades (with or without existing paid subscription) via Stripe using s2Member pro form;
-
Stripe sends notification to my web server, s2Member receives it, upgrades user as it should etc.
-
Stripe doesn’t receive a notification back from my site (it only happens sometimes) saying 200 OK or other sort of handshake it should, maybe because the server is busy, maybe because there’s a communication issue.
-
Stripe, then, sends the same notification (Item 2 above) to the server again, after a minute or a few, maybe once more, maybe a few more times, expecting to receive a handshake / confirmation / 200 OK or whatever is normal back from my Web Server.
-
s2Member CANCELS the subscription because of s2Member’s own “anti duplicate subscription” functionality as it thinks the user subscribed twice for any error. THIS is the feature that needs to be fixed to perform differently. s2Member also sends a request to Stripe to cancel the user’s subscription.
-
Final result is you get one single payment and the user is left downgraded and the recurring subscription is cancelled, meaning the system won’t collect automatically as expected, because s2Member sent Stripe a cancellation request, which Stripe fulfilled.
I understand that it’s expected that s2member will cancel an existing subscription when a user starts a new subscription to prevent the user from paying for more than a single subscription, as simultaneous subscriptions aren’t currently supported by s2member for a single user.
That routine that is designed to prevent duplicity should only act when there’s an actual duplicity and it should never cancel the subscription that it’s being notified on. Therefore there should be better testing to prevent a new subscription from ever being cancelled in that situation (if the user will have no subscription).
Also, ideally (maybe in a remote future), s2Member should use the fields that are editable by us like cus and sub fields not that long “string” that stays hidden from view. I frequently re-upgrade users that make late payments by editing both fields manually as s2Member doesn’t have dunning and recovery routines.
Of course, those things can be fixed on a later date but we need to have at least this feature that nukes subscriptions on Stripe deactivated somehow.
It’s ok to downgrade the user on your database only, we’re notified by it and we can re-upgrade the user manually, but recreating the user subscription on Stripe is a massive pain plus we lose 3D Secure status for any future payments related to that subscription.
I don’t use s2Member cancellation routines towards payment processors (I only take email requests for cancellations, I don’t trust cancellation buttons for many reasons). I cancel everything manually upon request or when I find redundancy. Is there an easy way to add a couple of php lines on my generic must use plugin to prevent any cancellation request of any sort to be ever sent from s2Member to payment processors as a temporary workaround until you fix this bug?
Thanks in advance!