S2member, nginx, and failed success redirect URL

I’m facing a strange issue. The Authorize.Net and PayPal Express Checkout shortocode “success” attribute redirect URL isn’t working. After purchasing, redirection is going to the login welcome page.

I’m testing on a localhost Windows development box. When I set the web server to apache, it’s fine, but with nginx it’s failing.

Within the gateway-core-ipn.log, s2-http-api-debug.log, and wp-http-api-debug.log I see references to s2member_paypal_proxy_return_url that point to the proper URL, but no matter what I’m taken to the login welcome page.

The strange thing is, when testing on a live, nginx, linux server, it works fine. I mirrored the nginx settings from live to localhost, and it made no difference. s2member configuration is the same also.

I know that there’s some parts of s2member’s codebase that does a conditional check against “apache” and I’m wondering if there’s some strange edge case that would cause just the success URL redirect to fail on windows, localhost, nginx and not on windows, localhost, apache.

If I know it’s something internal to s2member, I can try to work around it and not spend any more time troubleshooting nginx, firewall, and php.ini settings.

Thanks.

Hi TJ.

Very interesting behavior. I wonder why that happens. You’re following the steps I would, trying to remove as many variables as possible.

I’m assuming you are working with a new WP installation, and only added s2Member for our tests.

Do your server logs mention anything about the redirection?

If you search 2member_paypal_proxy_return_url in all files of your s2Member and s2Member Pro folders, you’ll get a list of all the places where it’s used, and it may help you identify the one that may be related to your issue…

Also, did you get any warnings with the Server Scanner? https://s2member.com/kb-article/server-scanner/

Please keep me updated with what you find. :slight_smile: