I’ve been working on a wordpress site with the S2member plugin for a couple years. After updating the site I’m now experiencing an issue with new registrations.
When the user completes their paypal payment, they are supposed to be redirected to the site. That is not happening.
“Thank you! Your account has been approved.The next step is to Register a Username for immediate access.”
With a button that redirects them to our protected registration page.
Thank you! Please check your email for further details regarding your purchase.
With a button that redirects the user to our home page. Leaving the user as subscribed to pay us, but not actually signed up in our system on Wordpress.
After doing some digging around it looks like the error has to do with Page Expiration?
The logs show the following
[s2member_log] => Array (  => Return-Data received on: Fri Jun 21, 2019 3:34:25 pm UTC  => s2Member POST vars verified through a POST back to PayPal.  => s2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.  => Page Expired. Duplicate Return-Data.  => s2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ).  => Page Expired. Instructing customer to check their email for further details about how to obtain access to what they purchased. )
So, S2 is reporting that the “Page Expired. Duplicate Return-Data.” I’ve tracked this down in the code and there’s an if statement that is causing this behavior, but I’m not sure what its purpose is.
if(!get_transient($transient_rtn = 's2m_rtn_'.md5('s2member_transient_'.$_paypal_s)) && set_transient($transient_rtn, time(), 31556926 * 10))
The interaction between our s2 site and the return after the purchase is brief. I’m curious why this would be returning that the page is expired.
Any help would be largely appreciated in understanding what the error is actually indicating is wrong.