Resending IPN from PayPal Resets Last Payment Date

Just found out a bug.

Instead of assigning the payment date as payment date, s2Member is assigning the notification moment as the payment moment (for PayPal, at least).

I just ran a test with a bunch of payments and messed up my database as it looks like all payments from July were made today in the system. Yay. :crazy_face:

Let it be a lesson to all of you. Do NOT re-send your IPN from PayPal if you don’t want this side effect. It’s all good, I’ll survive. I messed up my database so you don’t have to. :grin:

Do NOT re-send your IPN from PayPal if you don’t want this side effect.

So you are talking about IPN resends? I see…

PayPal normally sends the IPN when the payment happens, so I guess s2 just takes that as the payment time. I don’t think Jason was thinking about IPN resends, though.

I’m making a note about to look into it. Thanks for reporting it! :+1:


1 Like

The problem likely here is the old s2member crazyness of not identifying correctly the IPN with [0] => Unable to verify $_POST vars
and then identifying it correctly on resending.

But yeah if you resend an IPN which adds time and it had been received already - very likely it will add time again? I only resend IPNs that s2member messed up (1 in 20 to 1 in 300 IPNs sent)

1 Like

Well, this is very bad behavior. It should use the payment date, not the moment the message is received.

I only did that for very specific reasons I don’t want to share publicly, but it’s ok, I will just not rely on that information for a while.

The s2Next extra plugin only lets me read those dates so I am also unable to edit them manually if I want to.

I also can’t use that add on to edit other payment dates, that would be a very handy feature. I guess I should play around with the import/export when I have some free time, but thankfully it’s not my top priority.

Thanks anyways! :slightly_smiling_face:

Then your plugin is wrong, manages to get the right dates from any IPN resent - meaning the original one. I’m not sure what happens to the EOT date if you resend a payment that say extended the time by 1 year - I guess it adds it on top? I only resend IPN messages if s2member spaced out with unable to verify… Which is very bad form of s2. If it cannot verify IPN it should ask for resending to paypal or at least send out an error email to the admin.

This is s2Member not Quaderno. I don’t use Quaderno.

The problem is s2Member uses the moment it receives the IPN notification instead of actually reading the payment date from within the IPN notification and use it instead (plus it should also compare if there’s not a more recent date already on file, in case you send an older IPN after a newer one was processed).

We should be able to see the payment date when editing the user profile on Wordpress’ User Admin page and also edit it as well.

But s2member by default isn’t showing it. So I you use some other plugin like s2next extra - just make sure this plugin read the IPN call itself. That’s way more reliable than using database entries created by s2.
But then usually you want to only forward IPN notices that got received by s2member and not thrown away - so that’s my problem with the cannot verify - it messes up the whole chain of actions that should follow like sending invoices and registering the payment into my logs. On the other hand it’s better if those things are missing because I then notice and can extend the account or do whatever s2member failed to do on the account.

1 Like

Oh, that is @clavaque’s add on plugin that shows the Payment History/Log. I was indirectly giving feedback on it. Sorry. I thought you had it too.

I am not forwarding anything.

I also love to do many things manually. Well, not really love, but I find it effective so I love the results when I am able to achieve them.


I notice there’s a mention of the IPN treatment possibly being changed on today’s update. Should I resend the previous PayPal IPN messages to solve the records that are incorrect?

No you need to learn to read the changelog correctly - only stuff in the UI is changed. IPN handling is still identical for paypal - and the problem is with the plugin not with s2member core plugin.

Yes, I was still waking up, sorry. I am usually asleep in the morning but I had some construction work today. :grimacing:

The problem is with s2Member. I don’t know where you got the idea I have another plugin dealing with PayPal. I don’t.

You said s2next extra plugin. That one needs fixing

Yes, but that’s not the core of the problem.

The core of the problem is s2Member not assigning the payment date that comes within the IPN as the last payment date.

s2Next is just a window that lets us read information that is entirely processed by s2Member’s core.