• Resolved kawaiharuka

    (@kawaiharuka)


    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 a null 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us.

    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.

    No one has reported any bugs since the release of version 4.5.1. Our plugin has now been updated to version 4.5.3.

    We are still receiving IPNs from PayPal for users who purchased using the old PayPal buttons (non-API) and continue their subscriptions.

    Please check the following documentation to make sure the old subscription button is created correctly.

    https://simple-membership-plugin.com/create-paypal-subscription-button-inside-the-simple-membership-plugin/

    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.

    Yes that is correct. The IPN’s are related to your old PayPal recurring payments from your customers.

    I have submitted a message to the developers to investigate further your issue.

    Kind regards.

    Plugin Author wp.insider

    (@wpinsider-1)

    Hi, When you say September 23, do you mean August 23?

    The error you pointed out seem to be coming from some IPN messages without a valid transaction ID data. It might be related to a dispute or cancellation of those old subscriptions. Are you able to check your PayPal account to see if what type of activity (if any) has occurred for those subscriptions? This will give me some clue as to why the IPN message doesn’t have a transaction ID.

    We will also work on adding a condition in the plugin so it doesn’t produce an error when an IPN without txn_id is received, instead it should silently ignore it (which is what it used to do in the past).

    Thread Starter kawaiharuka

    (@kawaiharuka)

    Thank you both for your responses. I appreciate your assistance.

    You are correct; I made a mistake, and the date should be August, not September. I apologize for the confusion.

    First of all, the subscription button was not created using the method outlined in the guidelines you provided. As mentioned earlier, new PayPal purchases have been discontinued, and I believe the buttons were originally set up using the following method.

    At the time, I configured the PayPal subscription buttons using PayPal’s advanced option settings (with detailed variables) and added code similar to the following:

    rm=1notify_url=https://example.com/?swpm_process_ipn=1custom=subsc_ref=12

    However, while we were accepting new purchases, this setup worked perfectly. Even now, after discontinuing new PayPal purchases, automatic status changes upon cancellations for customers who subscribed back then seem to be functioning properly.

    Next, I reviewed the IPN history.

    It appears that successful payments from customers have IPN notifications with transaction IDs, and the HTTP response code is 200.

    However, in the following cases, the transaction ID was missing:

    When the payment could not be processed and entered the retry flow: No transaction ID, HTTP response code 200
    When the payment failed even after the retry flow: No transaction ID, HTTP response code 500
    Could you please update the plugin to prevent an error from being triggered when IPNs without a transaction ID are received?

    Plugin Author wp.insider

    (@wpinsider-1)

    Thank you for the detailed info. We will make an update to the code, so it doesn’t produce an error for the scenario you explained.

    Thread Starter kawaiharuka

    (@kawaiharuka)

    Thank you for your prompt response. I appreciate your assistance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.