Double payments issue with PayPal

I’ve mentioned this previously in other posts where people were complaining about Stripe double payments, but it should probably be a topic of its own.

I’ve been experiencing double payments with PayPal. It does not happen very often, usually once every few months, but it just happened again. A new member was charged twice, with the second payment charged less than a minute after the first. I’m using s2Member Pro along with PayPal Website Payments Pro.

And it just happened again. Another new member to my site was charged twice, two minutes apart.

Hi Stephen.

Thanks for reporting it. Although similar to the Stripe report, I doubt that they are caused by the same thing.

I’ve rarely seen this reported in the past, maybe 3 or 4 people total, and also happening very random and we don’t know the steps to reproduce it yet. I would like to get to the bottom of it…

Are you using the PayPal buttons or pro-form?

Do the entries for the double charge, have the same transaction or subscr ID, or are they different from each other?

Did you set this to help avoid duplicates? https://www.paypal.com/et/smarthelp/article/how-do-i-avoid-duplicate-transactions-ts1097

Do you have the related log entries from all the log files? Can I see?

I look forward to your update. :slight_smile:

Hi Cristian, thanks for your reply. I’m using Pro forms.

I had not seen that information on PayPal’s site about avoiding duplicate charges by blocking multiple payments for the same invoice, so I’ll try that first and see if it resolves the issue. Thanks for the link.

1 Like

Hi, this has happened to us recently too.

Are you using the PayPal buttons or pro-form?

Pro-form

Do the entries for the double charge, have the same transaction or subscr ID, or are they different from each other?

They have different IDs when the s2member notification system is triggered, starting with “RP”, and the numbers afterwards are one apart. The Payment IDs in PayPal for these two transactions are different.

Did you set this to help avoid duplicates? https://www.paypal.com/et/smarthelp/article/how-do-i-avoid-duplicate-transactions-ts1097

I have the “Yes, block multiple payments per invoice ID” option selected. Do I also need to add an invoice number? If so, how do I hook into s2member to do that?

Do you have the related log entries from all the log files? Can I see?

Where would I find these logs?

1 Like

Thanks for the additional info, Alan.

Interesting part is that they have different IDs, just one apart. And that the duplicate happened despite having the setting enabled.

The entries would be in one of the logs here: WP Admin > s2Member > Log Files

Same thing here, the option in PayPal to avoid multiple payments of the same invoice was already checked.

I’m just waiting for the problem to happen again and then I will check the logs. I didn’t know where to find them either. :slight_smile:

1 Like

@clavaque

The entries would be in one of the logs here: WP Admin > s2Member > Log Files

I took a look but I don’t have any log files there, and logging is turned off on my site. The s2member settings page for turning logs ON warns not to turn on logging on a production site:
Use only for debugging. This should NEVER be enabled on a live site.

Even if I were to activate this servers are added and deleted for me every day, so any log files stored with the codebase are spread out among multiple servers, and often lost whenever a server is terminated.

The warning is so that it’s not left on forever, forgotten. But you are troubleshooting, and you can delete the files after you’re done. It won’t affect the behavior of the site, it’ll just record some information that is useful to review when trying to find what’s going on.

You can keep it on for a while, and when a double payment happens on PayPal, go get the log files, hopefully before they get lost in the server changes you’re talking about.

Any additional info is helpful when troubleshooting. If you get them, that’d be great. If not possible, we’ll do the best we can with what we have.

:slight_smile:

You can keep it on for a while, and when a double payment happens on PayPal, go get the log files, hopefully before they get lost in the server changes you’re talking about.

Should I also do that for Stripe too, since we get a lot more Stripe duplicate payments? Or do you expect the new update with Stripe fixes to come out soon?

This would be independent from the Stripe issue, although both appear similar.

I shared the fix in the stripe thread some days ago, so you can implement it right away without wait for the release if you want. Stripe causing double payments

:slight_smile: