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:

Three times today, a new member to my site was charged two additional times for their membership, and all three transactions (the original plus the additional two) happened within a minute of each other. I’ve had to refund six payments so far today.

The only similarity seems to be that all three people paid using a PayPal account instead of a credit card.

Interesting. Thanks for the additional info, Stephen.

Could you tell me more about what you’re selling? I wonder if it has something to do with it… Asking just in case it does.

Hi Cristian, I sell three types of memberships to my site. There’s a 30 day membership, a 6 month and a 1 year membership. Two of the people who were charged three times within a minute today signed up for a 1 year membership. The other was for 6 months.

My statement earlier that all three paid using their PayPal account was wrong. Two of them paid with a PayPal account. One paid with a credit card. So no similarities there.

I did notice however that all three were membership renewals, where the person was logged in to their account before making the transaction. The other transactions today that went through without problems were all new memberships. Could it have something to do with that?

I’ve had this multiple payments problem on and off for years. This was the first time I saw so many on the same day.

1 Like

Thanks for the additional info! I’m sure it’ll help me narrow it down to find the reason behind this… :slight_smile:

Thanks for looking into it for me. I appreciate it. I’m just hoping maybe you would know more than I do. :slight_smile:

Looking at the PayPal receipts from one of the membership renewals that was charged three times today, all three show a different transaction ID, and they all happened within 30 seconds of each other.

The fact that all three were membership renewals seems like it should be a clue, but a clue to what?

Since my last message, I’ve had two more new members sign up without issue. So it still seems like it has something to do with the renewal process.

1 Like

they all happened within 30 seconds of each other.

Deja vu! That sounds extremely like part of the similar Stripe issue. I’m inclined to guess that your server is retrying the transaction before hearing back from PayPal, ending up with multiple ones.

If that is the case, I think I know what will take care of it. I need to look at how PayPal allows it with its API, which is very different from Stripe’s.

Just a thought, but when someone pays for a membership using their PayPal account, they choose PayPal as the billing method and then they click the PayPal checkout button. At that point, are they not taken from my site to PayPal’s site for the actual transaction?

Would that not mean that the problem happens on PayPal’s site? Or am I not understanding how it works?

Hmm… In that case you’re right… It slipped my mind for a second. I was so happy to see a similiarity that seemed to explain this odd behavior… lol

Could you please contact PayPal about it and see what additional info they can provide regarding those transactions? I’m hoping they’ll tell you something useful to get us closer to understanding the issue.

I look forward to your update. :slight_smile:

Ok, will do.

1 Like