PayPal IPN Error with Simple Membership Plugin
-
Hello,
I have been using the Simple Membership plugin, and recently encountered an issue related to PayPal IPN. I would appreciate your assistance with resolving this matter.Current Issue- The debug log for Simple Membership is enabled, but no errors are being recorded.
- On September 23, I updated the plugin to version 4.5.1.
- Since around September 28, I have been receiving an email from PayPal once or twice a day at around 14:00 with the following content:
Email content (PayPal IPN error notification):
Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL are failing:
https://examplexxx.com/?swpm_process_ipn=1
If you do not recognize this URL, it may be associated with a service provider you use on behalf of your customers. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.
We appreciate your prompt attention to this matter.WordPress & PHP Versions
- WordPress Version: 6.5.5
- PHP Version: 7.4.33
Server Error Log
The following error message is being recorded in the server error logs (the domain name has been replaced with
example.com
):[Thu Sep 12 08:06:32.331866 2024] [proxy_fcgi:error] [pid 40343:tid 40407] [client 66.211.170.66:49322] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to SwpmTransactions::get_transaction_row_by_txn_id() must be of the type string, null given, called in /home/root/example.com/public_html/wp-content/plugins/simple-membership/ipn/swpm_handle_pp_ipn.php on line 110 and defined in /home/root/example.com/public_html/wp-content/plugins/simple-membership/classes/class.swpm-transactions.php:197\nStack trace:\n#0 /home/root/example.com/public_html/wp-content/plugins/simple-membership/ipn/swpm_handle_pp_ipn.php(110): SwpmTransactions::get_transaction_row_by_txn_id(NULL)\n#1 /home/root/example.com/public_html/wp-content/plugins/simple-membership/ipn/swpm_handle_pp_ipn.php(349): swpm_paypal_ipn_handler->swpm_validate_and_create_membership()\n#2 /home/root/example.com/public_html/wp-content/plugins/simple-membership/classes/class.swpm-wp-loaded-tasks.php(72): include('/home/tempestst...')\n#3 /home/root/example.com/public_html/wp-conten...'
Additional Information
We are still receiving IPNs from PayPal for users who purchased using the old PayPal buttons (non-API) and continue their subscriptions.Over a year ago, we discontinued new PayPal purchases and now only accept Stripe payments, so no new PayPal purchases are occurring.The IPNs are likely related to recurring payments from existing users.
Details of the Problem
According to the error message, the
SwpmTransactions::get_transaction_row_by_txn_id()
function is receiving anull
value for the transaction ID, which is causing the error. It appears that this function is not being called correctly during the PayPal IPN processing.Request for Assistance
The issue seems to have started after the plugin update, so there may be a configuration error or a bug in version 4.5.1. I would greatly appreciate any advice on how to resolve this issue.
- You must be logged in to reply to this topic.