latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

"Invoice already paid" PayPal error on Pro

Home Forums Community Forum "Invoice already paid" PayPal error on Pro

This topic contains 10 replies, has 2 voices. Last updated by  Jason (Lead Developer) 3 years, 11 months ago.

Topic Author Topic
Posted: Wednesday Jan 16th, 2013 at 7:53 pm #37827

Hi,

A common error that appears when people try and pay for membership on s2member says ‘“This invoice has already been paid. For more information, please contact the merchant.”‘. This error appears right after the yellow PayPal button is clicked. I went to hell and back (see list below) to fix/test/diagnose until I found a simple solution. I thought I’d include this as a topic to save others the stress.

My PayPal account was set to block accidental payments from the same invoice. In the PayPal account, go to “Profile” – > “Payment Receiving Preferences” or ‘Block Payments’ or similar. In there you will have the option:

Block accidental payments:
– You may prevent accidental payments by blocking duplicate invoice IDs
– Yes, block multiple payments per invoice ID
No, allow multiple payments per invoice ID

Select “No” and S2Member works!

Courtesy of Terra from another post in another forum – info from a friendly soul over at PayPal

Many thanks in advance

Matthew
————————————————————————
HELL AND BACK
————————————————————————
1. I added define(‘WP_MEMORY_LIMIT’, ’96M’); and define(‘WP_CACHE’, true); to wp-config.php
2. I upgraded S2member framework and then installed s2member pro (all checksums match)
3. I ran http://www.yoooge.com/s2Member-check-my-server.php and it all comes up green
4. I reinstalled the paypal button on my members options page
5. I have multiple people from different IP’s try and buy membership. It first worked for me and works on my laptop. But it didn’t work for other people trying to buy membership. I did 1-5 above and then it did work for me and on laptop. Then a person bought membership and it stopped working again. Now it doesn’t work form on my PC or laptop.
6. I installed Quick Cache (default setting) plugin as recommended by S2Member to see if that makes any difference and it doesn’t’
7. I’ve since discovered my PayPal account was set to Mass Payment so I have since changed it back to Website Payments Standard. I have also re-added/reset all my PayPal IPN, PDT, blah blah.
8. I reinstalled the PayPal button code
9. It worked once for me again but NOT for other people. It again says “This invoice has already been paid. For more information, please contact the merchant.”
10. THEN I SORTED IT. A simple solution to the problem. My PayPal account was set to block accidental payments from the same invoice. It has nothing to do with S2Member.

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Thursday Jan 17th, 2013 at 2:10 pm #37917
Staff Member

Thanks for reporting this important issue.

For the benefit of others, please do NOT do this.

@Matthew Corcoran I understand that this provided you with a solution to an otherwise hellish problem. However, accepting multiple payments for the same invoice number can generally lead to confusion, and may cause further unexpected behavior with s2Member® going forward. s2Member does not expect every PayPal Invoice # to be the same.

To help you with this problem (i.e. why is s2Member not producing a unique Invoice# for each of your customers), let’s begin by looking at your s2Member PayPal Button Shortcode. Please post a copy of that here and we’ll review it with you.

NOTE: I really appreciate you posting this. It’s a good topic for discussion.
Posted: Thursday Jan 17th, 2013 at 5:45 pm #37954

Ok thanks

[s2Member-PayPal-Button level="1" ccaps="" desc="The Yoooge Workshop Members Section" ps="paypal" lc="" cc="AUD" dg="0" ns="1" custom="www.yoooge.com" ta="0" tp="0" tt="D" ra="47" rp="1" rt="L" rr="BN" rrt="" rra="1" image="default" output="button" /]
Posted: Thursday Jan 17th, 2013 at 6:06 pm #37955

I don’t know if this might create an invoice conflict but we are allowing some of our special members to join for free using open registration and we are then manually upgrading them to S2member level 1.

Posted: Saturday Jan 19th, 2013 at 10:11 pm #38365
Staff Member

Thanks for the follow-up :-)

OK. Good. Your s2Member Shortcode looks good!

The next thing I would take a look at is caching. Is it possible that your site (i.e. another plugin maybe), is caching the HTML that is produced by this Shortcode? That’s what I would suspect at this point. The same button is being clicked by each visitor to the site (i.e. the invoice is always the same)?

s2Member generates a unique PayPal® Invoice for each customer with the following code fragment.
As seen inside: /s2member/includes/classes/sc-paypal-button-in.inc.php

$paypal_invoice_input_value = uniqid () . "~" . $_SERVER["REMOTE_ADDR"];

I don’t know if this might create an invoice conflict but we are allowing some of our special members to join for free using open registration and we are then manually upgrading them to S2member level 1.

Nope. That sounds fine to me :-) I don’t see any issue with that.

Posted: Sunday Jan 20th, 2013 at 2:38 am #38396

Well, yes and now. I had no cache plugins installed and I still seemed to have the above issue. I did have previous cache plugins but I uninstalled them. Then I installed Quick Cache (Websharks – you?) and I still seem to have the same issue. Quick Cache is running on default settings.

Many thanks

Matt

Posted: Sunday Jan 20th, 2013 at 5:05 pm #38491
Staff Member

Thanks for the follow-up :-)

Please post a URL that leads to a page where your payment button is located. You can post that here if you like, or you can post it privately if you prefer. See: s2Member® » Private Contact Form

Thanks!

Posted: Sunday Jan 20th, 2013 at 5:26 pm #38497

Hi,

I have sent you my URL as a private message so you also get my login and FTP – which is great becasue of the time difference between USA and Australia. I give you full permission to login and change/do whatever you need to change/do to solve this issue – if you do that kind of thing.

Many thanks

Matt

Posted: Sunday Jan 20th, 2013 at 6:00 pm #38503
Staff Member

Thanks for your reply :-)

I took a quick look at that page, and I found this at the bottom of the source code.

</body>

</html>
<!-- This Quick Cache file was built for (  www.yoooge.com/upgrade/ ) in 0.77929 seconds, on Jan 20th, 2013 at 10:54 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Jan 20th, 2013 at 11:54 pm UTC -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Quick Cache Is Fully Functional :-) ... A Quick Cache file was just served for (  www.yoooge.com/upgrade/ ) in 0.00106 seconds, on Jan 20th, 2013 at 10:56 pm UTC. -->

This tells me that Quick Cache has somehow been enabled on this page. I’ve not seen this happen before on a default installation. By default, s2Member will communicate with Quick Cache and tell it not to cache any page that contains a PayPal Payment Button produced by s2Member.

If problems persist, please create a rule in your Quick Cache configuration to disallow caching on this page. That should fix you up. If you have any ideas about how this might have happened on your installation, please let me know (i.e. what does your Quick Cache configuration look like?). Have you made any modifications?

Posted: Sunday Jan 20th, 2013 at 6:41 pm #38515

Hi,

I installed Quick Cache after the above issue. I still had this problem without any Cache plugin. Anyway, I have setup a rule to not cache the above page but I still don’t know if that was the problem.

I think it’s a PayPal issue. Australia has a funny PayPal setup and I have seen other posts from other php systems, shopping cart systems, Joomla, etc post this error. So I will leave PayPal set to allow duplicate invoices because at least it’s working (I was loosing money before).

Unless you can find another cause.

Many thanks

Matt

Posted: Sunday Jan 20th, 2013 at 8:50 pm #38541
Staff Member

Thanks for the follow-up :-)

Gotchya. Well after testing with Quick Cache disabled on that Page for awhile, please let me know how it goes. If there is something fishing swimming around at PayPal in Australia I’d love to know if there is something we an do about it. If you have any information you can share, please let me know :-) Thanks for your patience!

Viewing 10 replies - 1 through 10 (of 10 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.