Error with Paypal Auto-Return URL

Your problem is very strange.
Have you tried to disable all other plugins, especially those related to your website security?
You should test a payment with s2Member as the only plugin to see if there is any conflict.
Maybe there is a change in your server configuration too… I know that s2Member does not really like some caching and security modules like ModSecurity.
It may also be a problem listed PayPal but in this case why would not there be more feedback on this problem?

Seems like now it’s working fine for me.

Yesterday I tried using the success=“https://…com/thankyoupage/” attribute as Brice suggested, and it worked!

But it didn’t work as it was supposed to do.
It was supposed to load the Thank you page after a successful payment at Paypal, but it loaded the Auto-Return URL: https:// …com/?s2member_paypal_return=1

That’s the page that it had the error message.

So now it’s working fine, I clicked the “Register Now” button and I went through the whole registration and everything worked just fine.
I tested it yesterday and again today, and I can’t believe that attribute (that doesn’t really work) solved the problem :open_mouth:

I have current version of wordpress, buddypress and I am having this same error. The first time I had a friend test it, I had only s2member free version. I upgraded because I thought I could get coupon codes. After I got it I realized that coupon codes only work if you are taking payment onsite. I still wanted to use buttons and have configured this accordingly. My point is that this error occurred with the free version and also the pro version…

The error:

$_SERVER[HTTP_HOST"] the original shows a _ between HTTP and HOST
If you are the site owner please check custom value in your button code. It must start with your domain name

I have:

a. deactivated all plugins except s2memberpro and tried it that way also.
b.gone through every step listed on s2member, created and selected a membership options page and a login welcome page.
c. gone through paypal and made sure all was correct, sent a support ticket with the log files to paypal support, have not heard back, to ensure that all my info is correct on their end
d. have doublechecked that all the info from paypal is correct on s2member


Then, I have:

  1. I moved the custom=“” to the front of the shortcode right behind the description
  2. I added https:// to the domain in custom, in its original location and then behind description
  3. did both of those combos and added success=“” right behind the custom
  4. then I deleted custom and left success in there

The payment goes through. My test client receives the email notifications as do I. I cancel the subscription easily. I and tester receive all notifications of that.

Last thing I tried was to bypass the Auto return completely, both in paypal and the site. That was a flop, it went no further than paypal screen saying that there appeared to be something wrong.

Only one time has the test client registered to the site from the payment received emails and that worked beautifully. I made sure to delete this user from the site after I had cancelled on paypal first.

I am at wits end. I want to use this membership plugin, so I want it to work. Ideas? Thank you in advance.

I will report in if and when tech support at Paypal answers. It appears to me that this is an issue between s2member and paypal. Perhaps paypal changed something slightly and that is what is causing this. So, my answer was so simple I think I will sleep on it before I get ecstatically happy. I switched to Stripe. It took 10 minutes to set up my business account and another 10 to tie it into s2member. I kept pinching myself that it couldn’t be right. I logged off the computer and my test client used his phone to sign up. It went through in seconds, YEAY. The only complaint I have, and will tackle tomorrow is that his notification emails are wonky. But, that seems fixable.

I also have the exact same problem. Payments go through but the “Unable to verify $_SERVER[“HTTP_HOST”]” s2 member error comes up and the person has no way to register. It has worked perfectly for years up until now. Not sure when it started exactly as I didn’t have logging enabled to protect private info, but it was working up until this past September at least. Nothing has been changed on the website since at least last spring.

-Enabled logs and tried again…shows:
[0] => Return-Data received on: Sun Nov 25, 2018 11:09:49 pm UTC
[1] => s2Member POST vars verified through a POST back to PayPal.
[2] => Unable to verify $_SERVER["HTTP_HOST"]. Please check the custom value in your Button Code. It MUST start with your domain name.
[3] => Redirecting Customer to the Home Page (after displaying an error message).

-checked button code and the it does start with domain
-disabled all plugins besides s2member, and also tried disabling my theme, no change
-tested using an email and paypal that has never been used on the site, no change
-tried a new paypal button generated by s2member, no change
-tried, changing custom value by including the “http://.ca" instead of just ".ca”, no change
-when it shows the error page if I press back then it says thank you and check your email for registration details, but it never comes, they just get an email saying that their membership has been approved

Many users of s2Member have this problem since last September, the solution would be to go through a PHP syntax instead of the shortcode.
You can read an example of a topic on this problem here: Click Here!

I was just contacted by Paypal after I put in a request for them to check into this and see what the problem is. They responded this morning:

Hey Linda,

We do apologize for the delay and the inconvenience.

There is an issue with PayPal for auto return, your account also might affected with that issue. Once it is resolved, Auto return will work without any issues.

Thank you!

I have asked them to let me know when this is resolved.

Thank you very much for your return, but I find the answer from PayPal very evasive and uninterested by your problem, which seems besides the problem of many people…

I’ve been using S2Member since 2012. Now, I’m having the same issue with my PayPal checkout. It appears that it just started recently. It is resulting in folks paying twice on several occasions. I hope that you’ll keep us updated on what PayPal says. I can’t find any solution that works through S2Member.

I will do that as soon as I get their response. It took a week last time.

A workaround for this problem seems to use the PHP syntax <?php do_shortcode('[s2member shortcode]') ?> instead of Wordpress shorcodes in pages/posts.
I have always been using this method myself and do not have a similar problem.

Ok, so paypal contacted me today and said the following:
We got an update from the product team that the issue has been resolved. Would you please check and confirm us that the issue has been resolved or not?

I no longer have paypal, so can someone else test? Thank you

not working on my site with same issue…

Thanks for the update! I haven’t tested yet, but I don’t think the issue is fixed. Still seeing double payments for customers through PayPal. (They purchase and then pay again since they get the error.)

I’ve got the same error appearing with all new memberships and have been desperately trying to resolve this issue for a couple of weeks now. It’s still happening this week, including this morning, so can confirm it definitely is not working. Time for me to jump ship to another membership plugin I think as I can’t carry on like this

Could you show me the entries from the s2Member logs for these transactions that had a problem? Please obscure any sensitive information.

Does it happen with every transaction or only some? Can you find a common denominator between them? Can you reproduce the problem consistently? If so, could you try reproducing it in a clean WP installation with just s2Member added?

@GDUKMum same for you. It’d be great to isolate what is causing this to happen in your installations, since it doesn’t seem to be happening to everyone.

I look forward to your updates. :slight_smile:

Hi Christian,

It’s sooooooo good to see you here! I don’t have logs enabled since the site is very active and I’m concerned about security. I haven’t had anyone report the error recently and I’m not seeing double payments anymore. I’m assuming the issue was with PayPal and perhaps it was resolved.

That’s great! I’m glad that’s back to normal. Yeah, from what I’ve seen reported, it seems to have been a glitch on PayPal’s side.

Well, next time you see it acting up, enable logs so we have more data to diagnose. It’s not a problem to use logging when needed. Just use them while troubleshooting and, when you’re done, remember to disable logging and remove the logs from your server.

It’s good to see you, too. :wink:

I’m still seeing the error consistently on my site. I’m using a s2 generated paypal button. Payment completes, without issue but the
ERROR: Unable to verify $_SERVER[“HTTP_HOST”]
is returned to the customer and they do not get a confirmation email.

I then have to go into paypal, grab the transaction ID, generate a link and manually send to customer.

Would appreciate your assistance!

If you have logging enabled, could you show me the related entries (obscuring any sensitive info).

If not, could you enable it and reproduce the problem to get some logs?

Also please show me the shortcode for the PayPal button having this problem.

I look forward to your update. :slight_smile: