New Paypal Subscription: Error Page Expired. Duplicate Return-Data

Hi,

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.

Expected Behavior:

“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.

Actual Behavior:

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.

Research

After doing some digging around it looks like the error has to do with Page Expiration?

The logs show the following

   [s2member_log] => Array
        (
            [0] => Return-Data received on: Fri Jun 21, 2019 3:34:25 pm UTC
            [1] => s2Member POST vars verified through a POST back to PayPal.
            [2] => s2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.
            [3] => Page Expired. Duplicate Return-Data.
            [4] => s2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ).
            [5] => 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.

s2member/src/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:57
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.

Thank you!