IPN/PDT and Auto returns are not working at all

Hell, Can any one please help me with auto return data from paypal. It used to work but from one month this has been stopped working, there is no data coming in the thank-you page url and neither in the log file as well, before that it used to send the whole payment data an also return the custom field as well but now it has stopped, it only send back tra, and token that’s it

here is my log how it looks and the other logs also look the same as well
LOG ENTRY: Tue May 20th, 2025 @ precisely 6:25 am UTC
PHP v8.1.32 :: WordPress v6.8.1 :: s2Member v241216 :: s2Member Pro v220421
Memory 139.16 MB :: Real Memory 140.00 MB :: Peak Memory 139.23 MB :: Real Peak Memory 140.00 MB
aws2.staging.tempurl.host/?s2member_paypal_return=1&s2member_paypal_return_tra=ZGVmNTAyMDAzYTYwNDRhNDkzMGYwYjNhMzJiYTdiMGU0YjZmNGEyYWQ3M2FiZjZmZWFlMmRlYzU0YmU5MzM2Mjc5ZDRmYjUxMTAxODBhYWNjZjYzNDY0NTA0MmUwZDEyNmU3MTYyZThlNjRjMjFkZTI2YjIxMWVhOTA3ZDcyMmZmNDQxMjZmMTNlYTFmYzk4ZTcxYTYzNWJiNDJiMGVkZjQxMDEyZWUzMTBhZjcwOGM5OTQ4NTM1YzM2ODc4ZjI2NWYyNWE5MGY1NWY4Njg2OTk1OTUwYTljYTM2MjViYjdhZWY0MTgxMGZkMmVhMWRlNTI3ZDRhMGJiMmZjMjVkYjFjN2VlODg4YmEzZTBmMTAxNzIzZmQzNjIwZTlhZDQzOWZkZGFlYmI0NWQxMDQxZjJmZjVhOWZmNDAxOGEyOGVkY2NhZThiNDIyMWNjMWM3ZTZkNDExZGNjOWZmODgzNjQ4NzVmZDYzNGQ3ZjI4ZjZiYzlkZmYxMTA0YmQ3NTA4NWFjZWUxODI2YzFhMjFjNjYwZmY0OTQ4Y2ViYzQzNGVmOTU2MzQ2ODc3N2NmZWIzY2M4YzU5ODUyYmEyNDkxOWI0YTg5NTFjMWE2MzBkNTAwMWYxMjVmODI4MzUzMWM3Zjk3NmRjMjRiNjdjYzUwMWNlZjI5YThiYThiYWVkNjgxOGE3ZmIwNTNkYTMyZjkwMDA1ZThhNmY0Yjg1NDAwYjM5N2JhMTA0Y2M1NmY4ZmY4YTc1MjY0MjdhZjAzZmE5NjY3MTA1ZDIzMTdlNmI0MjEwNDRkZThhNGYzOGE0YjE4ZjRmNjZjNTc0NjI3YTUxMDJkMTgyOTY4OWZjNThjZDA3MjFjNWM5NjlkYzkzYTdjNmM5ODM4MTFjNzUxMzU5MjZkZmI2Y2I5NDE3MDkwNWI5ODNjOGM0NTM&token=4EU379346E261815X
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Array
(
[subscr_gateway] => paypal
[s2member_log] => Array
(
[0] => No Return-Data. Customer MUST wait for Email Confirmation.
[1] => Note. This can sometimes happen when/if you are offering an Initial/Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only (i.e., behind-the-scene), and the Customer must wait for Email Confirmation in these cases.
[2] => array (
‘s2member_paypal_return’ => ‘1’,
‘s2member_paypal_return_tra’ => ‘ZGVmNTAyMDAzYTYwNDRhNDkzMGYwYjNhMzJiYTdiMGU0YjZmNGEyYWQ3M2FiZjZmZWFlMmRlYzU0YmU5MzM2Mjc5ZDRmYjUxMTAxODBhYWNjZjYzNDY0NTA0MmUwZDEyNmU3MTYyZThlNjRjMjFkZTI2YjIxMWVhOTA3ZDcyMmZmNDQxMjZmMTNlYTFmYzk4ZTcxYTYzNWJiNDJiMGVkZjQxMDEyZWUzMTBhZjcwOGM5OTQ4NTM1YzM2ODc4ZjI2NWYyNWE5MGY1NWY4Njg2OTk1OTUwYTljYTM2MjViYjdhZWY0MTgxMGZkMmVhMWRlNTI3ZDRhMGJiMmZjMjVkYjFjN2VlODg4YmEzZTBmMTAxNzIzZmQzNjIwZTlhZDQzOWZkZGFlYmI0NWQxMDQxZjJmZjVhOWZmNDAxOGEyOGVkY2NhZThiNDIyMWNjMWM3ZTZkNDExZGNjOW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Q4NzVmZDYzNGQ3ZjI4ZjZiYzlkZmYxMTA0YmQ3NTA4NWFjZWUxODI2YzFhMjFjNjYwZmY0OTQ4Y2ViYzQzNGVmOTU2MzQ2ODc3N2NmZWIzY2M4YzU5ODUyYmEyNDkxOWI0YTg5NTFjMWE2MzBkNTAwMWYxMjVmODI4MzUzMWM3Zjk3NmRjMjRiNjdjYzUwMWNlZjI5YThiYThiYWVkNjgxOGE3ZmIwNTNkYTMyZjkwMDA1ZThhNmY0Yjg1NDAwYjM5N2JhMTA0Y2M1NmY4ZmY4YTc1MjY0MjdhZjAzZmE5NjY3MTA1ZDIzMTdlNmI0MjEwNDRkZThhNGYzOGE0YjE4ZjRmNjZjNTc0NjI3YTUxMDJkMTgyOTY4OWZjNThjZDA3MjFjNWM5NjlkYzkzYTdjNmM5ODM4MTFjNzUxMzU5MjZkZmI2Y2I5NDE3MDkwNWI5ODNjOGM0NTM

)

and i am not giving user any trial period as well so please let me know what is the issues here. I have also disabled the encryption as well, and i am using paypal button.

Your current setup worked before, right? So just to confirm, absolutely nothing changed on your end? No plugin updates, no new security settings, no move from HTTP to HTTPS, etc.?

Double-check that everything under WP Admin > s2Member > PayPal Options is still set correctly, especially the PDT identity token and return URL format.

Are you being returned automatically from PayPal after payment, or are you clicking the return link manually? (manual return often skips the full POST.)

Did you try a different browser or device? Some privacy settings or extensions (like uBlock or NoScript) can block PayPal’s auto-postback behavior.

Are you receiving the signup confirmation email? What does gateway-core-ipn.log say for that transaction?

Is the payment showing up in your PayPal account as Completed? Is it a live payment or sandbox ? If sandbox, test a real $0.01 payment, sandbox behaves differently sometimes.

Also: check if PayPal’s Payment Data Transfer (PDT) is still enabled and correctly configured in your account. If that broke or was disabled, it could explain exactly what you’re seeing.

:slight_smile:

Thanks, for the reply yes it used to work i have also return some code as well when paypal used to return data in url i used store that data in custom user meta for email work but now there is no data what so ever
and also to ans your questions
yes the pdt is enabled with the token and ipn is enabled as well.
Important :- No I am not being auto return to the thank you page i have to manually click the button return to merchant which not used to happen before. And even the payment process is weird as well first it used to ask how much money for the payment now it does not do that it takes me directly to Credit or visa https://prnt.sc/rKh4-p_QmZs3

before that this how it used to look when i try to checkout https://prnt.sc/h5w_-QQ7QNOq

I am testing this in sandbox not in live since i want to add some functionality but it used to work with sandbox without any problem before.

I don’t see any file name “gateway-core-ipn.log”

But there might have been some update in the s2member plugin.

please let me know if there is any thing wrong here as the whole website work has been paused due to this reason.

Thanks for the additional details.

Could you test this with a live transaction? 1 cent is enough. I want to rule out the Sandbox as the cause, it has happened before.

In any case, PayPal Standard buttons have been acting weird lately, so I’m working on a new integration with a newer payPal product now. In the meantime, let’s see if we can make this work for you.

Do you have s2Member Pro? If so, could you try the pro-form? that one uses PayPal Express Checkout’s integration.

:slight_smile:

3 Likes

Hello,
Sorry for the late reply i have tested the payment withe paypal live account here are the result.

That page said the transaction was successful then then redirected me to

https://www.aws.org.au/?s2member_paypal_return=1&s2member_paypal_return_tra=ZGVmNTAyMDA4ZDEwYTRhOGI0MWIyZGU4ZGU0YTYzODZhY2Q1OTI1MGYyYTEyODE2Zjc3ZWNmNTI1OWUxOGQ4NmVjYWRhNzgwOTdmNGU2OGFjZWY5ODBlOWIxZWMxOTZhNGU0ZWU1YWZiM2Q4OGExZDlmZDFkYTNiYWFjMDU1OWNlYzJjMWMxMmM0M2E0NGM0NDYyMjk3ODM4MzNlZWQxMzMwZjE1MDZhYjZmZTRhODRhYjQyZWY4MGQ3YzJjODM1MzFmYjMzMmU2ODUxZTkxZDIwYjMwMzAyMmZlMzY3ZTRjMDBlNWZjM2Q5YTM1YWE2YjIyOWFhODA2MDc5YjE0OTJjMTg2NDg3MmVmNWYzY2JjN2JlMzUyOGI1ODU3OTg5MjUyNWMzYjc1MTNmYmRiMGE4YjE3YTAzNzA0OGQ1NDI1OTQxNjNmMmRlYjE1YmEzZTc0ODc3OTk4NGI4OGVlYTc0ODVkOTkzZTliODY4YmE0ZDRhNDRjZWEwZTE5YWYwOTgwZTI5NzIwZDI5Y2U4NjFiZjAxZWMzYjcyZGM0MzRkNDE3YjQ1NWU0NzMzYWZhOTMzNTgxMGFlMWJlYTdmOTZiZDllMjhjNDQ5NDBiZWI1Y2EyMjAwZTc2ZTU5NDM2YTM2MWM1OGYwOWZhNDA1MWVjYjBhZGQxYjkxZjEyZGJiNjZjODY1OTdhMTAyMjkyZWY4YjY0MmQzOTM2ZmNhZjhhM2FhMDRiODgwODA3Y2RmM2VkNjAwODBjYTgzZjQyODE0NTQ3ZmQwOWYyYzE2MTI2NGVmMTYzNzMzYzVkYTI1ZmVkNDUyNjU1MjBlNGRjOGRiZWUzOGUwZjQ1YzVjMTBiNDkwM2ZhNGQzZmExMjg5OGM1N2M2N2Q5YTllMjQzZDkxN2MxOTI1ZmM1ZGRiYzZhNWFjZTM1NmM4Yw&PayerID=5XFYJCA72HGLG&st=Completed&tx=5ER41046WY968561K&cc=AUD&amt=1.00&cm=www.aws.org.au&payer_email=johnfoskett%40gmail.com&payer_id=5XFYJCA72HGLG&payer_status=VERIFIED&first_name=John&last_name=Foskett&txn_id=5ER41046WY968561K&mc_currency=AUD&mc_fee=0.33&mc_gross=1.00&protection_eligibility=ELIGIBLE&payment_fee=0.33&payment_gross=1.00&payment_status=Completed&payment_type=instant&handling_amount=0.00&shipping=0.00&item_name=E-Mag%20Membership&item_number=1&quantity=1&txn_type=web_accept&option_name1=Originating%20Domain&option_selection1=www.aws.org.au&option_name2=Customer%20IP%20Address&option_selection2=49.187.209.89&payment_date=2025-06-06T04%3A17%3A38Z&receiver_id=V3TTRM7CWMFR6&notify_version=UNVERSIONED&custom=www.aws.org.au&invoice=684264a8e6ad0~49.187.209.89&verify_sign=ArPnfMCIG3CBLTvZnS9FyCOmVU23ANyNTot6EW.5gF4Au08qeQApskEG

That page had an error on it

this what i am getting So please check and let me know how i can fix this issue this issue came with the paypal live account.

Thanks for the update.

Can you show me the s2Member shortcode you’re using? is it a button or pro-form?

What does s2Member’s core-gateway-rtn.log say? What do the other logs say for that transaction? WP Admin > s2Member > Log Files

Can you try the server scanner to see if it mentions any issues? https://s2member.com/kb-article/server-scanner/

:slight_smile:

Thanks for the quick reply,
I am using paypal button and below is the code for it
[s2Member-PayPal-Button level=“2” ccaps="" desc=“Concession Membership / description and pricing details here.” ps=“paypal” lc="" cc=“USD” dg=“0” ns=“1” custom=“www.aws.org.au” ta=“0” tp=“0” tt=“D” ra=“10” rp=“1” rt=“M” rr=“1” rrt="" rra=“1” image=“default” output=“button” /]

and here is the file s2Member’s core-gateway-rtn.log
gateway-core-rtn (1).log.zip (5.3 KB)

and last thing i have tried to download the server scanner but the file was not downloaded
https://s2member.com/kb-article/server-scanner/ when i clicked nothing happened so please check.

I am using paypal button and below is the code for it
Thank you, that looks okay.

https://s2member.com/kb-article/server-scanner/ when i clicked nothing happened so please check.

That’s odd, it worked for me. Here it is: s2-server-scanner.zip (42.8 KB)

and here is the file s2Member’s core-gateway-rtn.log
Thank you, I’m reviewing it and looking into the return handler…

Did you make double sure that your PDT Token is correct in the setup?

It used to work but from one month this has been stopped working, there is no data coming in the thank-you page url

If you didn’t change anything to the s2Member-PayPal setup, then the issue would be outside of it. Maybe you updated some plugin that is now messing with it? Or maybe some server setting… If something strips or loses the POST variables when the user is directed back from PayPal to the site, you’d get this behavior.

Recently I had a client with a similar problem, but missing the GET vars, and the culprit turned out to be a setting in the Yoast plugin that was redirecting the request and dropping the variables. Maybe a similar situation is happening here with your POST vars.

If you haven’t yet, you could try deactivating other plugins/theme, test again, and see if the issue goes away. Test with 1 cent live transactions. If you can’t disable the plugins on the live site, make a copy of the site. Or create a clean installation of wordpress, add just s2Member and test, see if you get the issue with just those.

For some extra diagnostics while troubleshooting, please create this must-use plugin file: /wp-content/mu-plugins/s2member-paypal-debug.php

<?php
/*
Plugin Name: s2Member PayPal Debugger
Description: Logs s2Member PayPal return and postvars processing to wp-content/s2member-paypal-debug.log
*/

if (!defined('WP_CONTENT_DIR')) return;

$log_file = WP_CONTENT_DIR . '/s2member-paypal-debug.log';

// 🔹 Entry point into the PayPal return handler (before any processing)
add_action('ws_plugin__s2member_before_paypal_return', function($vars) use ($log_file) {
    $log = "\n\n🚪 ENTRY: ws_plugin__s2member_before_paypal_return (raw request state)\n";
    $log .= "🔹\$_GET:\n" . print_r($_GET, true);
    $log .= "🔹\$_POST:\n" . print_r($_POST, true);
    $log .= "🔹\$_REQUEST:\n" . print_r($_REQUEST, true);
    file_put_contents($log_file, $log, FILE_APPEND);
}, 10, 1);

// 🔹 Start of postvars resolution (PDT, IPN, Proxy)
add_action('ws_plugin__s2member_before_paypal_postvars', function($vars) use ($log_file) {
    $log = "📍 BEGIN: ws_plugin__s2member_before_paypal_postvars\n";
    file_put_contents($log_file, $log, FILE_APPEND);
}, 10, 1);

// 🔹 If filters override the postvars manually
add_filter('ws_plugin__s2member_during_paypal_postvars_conditionals', function($postvars, $vars) use ($log_file) {
    $log = "🧩 FILTER: ws_plugin__s2member_during_paypal_postvars_conditionals\n";
    $log .= print_r($postvars, true);
    file_put_contents($log_file, $log, FILE_APPEND);
    return $postvars;
}, 10, 2);

// 🔹 After successful PDT/IPN verification
add_filter('ws_plugin__s2member_paypal_postvars', function($postvars, $vars) use ($log_file) {
    $log = "✅ VERIFIED: ws_plugin__s2member_paypal_postvars\n";
    $log .= print_r($postvars, true);
    file_put_contents($log_file, $log, FILE_APPEND);
    return $postvars;
}, 10, 2);

// 🔹 Log outbound requests to PayPal
add_filter('http_request_args', function($args, $url) use ($log_file) {
    if (strpos($url, 'paypal.com/cgi-bin/webscr') !== false) {
        $log = "📤 HTTP REQUEST to $url\n" . print_r($args, true);
        file_put_contents($log_file, $log, FILE_APPEND);
    }
    return $args;
}, 10, 2);

// 🔹 Log inbound responses from PayPal
add_filter('http_response', function($response, $args, $url) use ($log_file) {
    if (strpos($url, 'paypal.com/cgi-bin/webscr') !== false) {
        $log = "📥 HTTP RESPONSE from $url\n" . print_r($response, true);
        file_put_contents($log_file, $log, FILE_APPEND);
    }
    return $response;
}, 10, 3);

Make sure there’s nothing before the opening <?php. After your tests, get the log from /wp-content/s2member-paypal-debug.log. You can email it to me to: support at wpsharks .com.

:slight_smile:

I have checked the above response and i was able to fix the thank you page and now the data is coming perfectly the issue with PDT KEY client didn’t setup that properly,

I have one more important request where i want to keep the track of the subscription date meaning i want send email to user whose next subscription date is upcoming, for that i have created some user meta and some tag as well which i am using the mailchimp so when the next payment for recurring subscription how i can know where i can get that data like do i have to use webhook, but i think s2member already send recurring payment data on website otherwise recurring payment might not work so how i can get that data and use that.

I just want to update the date in usermeta when next payment happened for recurring cycle that’s it so that i can keep the date track.This is last request.

Thanks you are very big help.

I have checked the above response and i was able to fix the thank you page and now the data is coming perfectly the issue with PDT KEY client didn’t setup that properly,

Good! So the PDT setup wasn’t correct, that’d explain the trouble you were having. I’m glad you sorted it out.

i want send email to user whose next subscription date is upcoming

In s2Member Pro you have the EOT reminder emails, and they can be used for coming payment times as well, see: https://s2member.com/kb-article/eot-renewalreminder-emails-for-next-payment-time/

:slight_smile:

Hi,

I’m using the s2Member PayPal button with all settings configured correctly. However, when I’m redirected to PayPal for payment, the interface displayed is incorrect — it shows an editable price field , which shouldn’t happen.

Here’s a screenshot of the issue: https://prnt.sc/8aEDanTSYbxM

The price for the membership should be fixed, as it’s already set in the PayPal button being used. Users should not be able to change it.

Can you please help me resolve this so the payment flow works as expected?

Thanks,

I’ve seen that happen with the encrypted buttons sometimes, but not with the unencrypted ones.

I checked out the website, and looked at one of the button’s html, and it was unencrypted. Then clicked it, and on PayPal it has the amount set:

Screenshot%202025-06-19%20at%2014-05-55%20PayPal%20Checkout%20-%20Choose%20a%20way%20to%20pay

Could you tell/show me exactly what button is giving this behavior? So I can check it out. Thanks!

:slight_smile:

Thanks for your previous response. After reviewing other forums, I found that the issue might have been due to using an encrypted PayPal button. I changed the setting from encrypted to unencrypted , and it’s working fine now. I appreciate your help.

I have one more question:
Is there a way to detect when a user completes a recurring payment —not just the initial one?

Currently, when a user makes their first payment , they return to our thank-you page, and we use that opportunity to save custom user meta like this:

php

CopyEdit

update_user_meta($user_id, 's2membership_email_date', $email_time_formatted);
update_user_meta($user_id, 'payment_type', 'paypal');
update_user_meta($user_id, 'membership_status', 'paid');

However, I’d like to update the membership_status or another meta field each time a recurring payment is successfully processed—especially the second and subsequent payments—so I can sync it properly with Mailchimp and avoid sending magazines to users whose payment might have failed or expired.Is there a recommended way to hook into successful recurring payments, possibly via IPN or a specific s2Member hook?

Thanks again for your help!