Membership 2 Pro : PayPal warning over IPN URL broadcast

Hi,
As discussed on another thread, since adding the IPN URL as instructed for the PayPal gateway, I receive a lot of error logs due to broadcast of details for subscriptions that were not made through the Membership 2 Pro plugin. I was told this won't cause a problem and I can just ignore them. However, I have received the following message from PayPal several times:

---
Please check your server that handles PayPal Instant Payment Notifications (IPN). Instant Payment Notifications sent to the following URL(s) are failing:
http://www.obscured.org/ms-payment-return/paypalstandard

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.

Thank you for your prompt attention to this issue.

Yours sincerely,
PayPal
---

What can I do to stop my PayPal account being disabled? I understand I needed to enter the IPN URL on the PayPal site so that Membership 2 Pro will know if future subscription payments for this it handles are made when the time comes or the arrangement is cancelled.

I wonder if making some sort of default invoice for these other payments might be a solution.
The people paying subscriptions directly via PayPal (actually membership fees or donations) are not necessarily members under the Membership 2 Pro system, so any invoice I create will not be assigned to a registered user.

  • Vinod Dalvi

    Hi Mike,

    I hope you are well today and thanks for posting on the forum.

    Are you using Membership 2 pro plugin PayPal Standard Gateway?

    Please make sure you have setup the IPN listening URL in your Paypal account as described on the following page.

    https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/

    It's also instructed in the Membership 2 pro plugin PayPal Standard Gateway settings screen as shown in the attached screenshot.

    Best Regards,
    Vinod Dalvi

  • Mike

    Dear Vinod,
    Please read my initial posting again.
    As I explained, I have followed the Membership 2 Pro instructions to set up the IPN URL in PayPal (exactly what you have just told me to do in your reply).
    The problem is that I have many people paying by subscriptions through my PayPal account separately to Membership 2 Pro subscriptions.
    PayPal broadcasts information on all payments to the Membership 2 Pro IPN URL.
    PayPal has sent me the warning email because the majority of those are logged as errors by Membership 2 Pro as they were not set up through the Membership 2 Pro system.
    My question is, PayPal has warned me that it will disable the broadcasts if they are not handled by the receiving IPN URL (i.e. Membership 2 Pro). So what do I have to do to prevent this happening?
    I hope the situation is now clear. I will give access to my site so someone from technical support can look at the error logs to see what is happening.
    PLEASE NOTE - THIS IS URGENT AS I DO NOT KNOW HOW LONG I HAVE BEFORE PAYPAL TAKES ACTION TO DISABLE THIS FUNCTION.

  • Vinod Dalvi

    Hi Mike,

    Sorry for the misunderstanding if any

    Please check your server that handles PayPal Instant Payment Notifications (IPN). Instant Payment Notifications sent to the following URL(s) are failing:
    http://www.obscured.org/ms-payment-return/paypalstandard

    What i wanted to tell you is that according to your site domain the IPN URL should be http://www.yoursite.org/ms-payment-return/paypalstandard as shown in the attached screenshot but in the above shared log it is http://www.obscured.org

    Just wanted to confirm are you also using the Membership plugin on the site http://www.obscured.org and also want to set up IPN for it ?

    If yes then paypal doesn't allow to set up multiple IPN URLs but you can achieve this using the solution posted in the following replies.

    https://premium.wpmudev.org/forums/topic/membership-plugin-paypal-ipn-is-already-used-in-my-paypal-account#post-903139
    https://premium.wpmudev.org/forums/topic/paypal-ipn-on-multiple-domains-and-only-1-paypal-account#post-887996

    I logged in to your site and found many of the transactions are displaying the error message as "Error: No invoice or custom data specified."

    I have notified our SLS developer to get his valuable reply here regarding this.

    He will reply here ASAP but please keep in mind though that developers have a lot of responsibilities so this might take a bit longer than a normal ticket.

    Regards,
    Vinod Dalvi

  • Mike

    Dear Vinod,
    I put "obscured" instead of my domain name because WPMU DEV instructs us not to put identifying information in our posts (as you have just done by publishing my domain name).
    Of course I have put the correct URL. I have only one domain name set in PayPal - you can only set one domain name. PayPal does not allow you to set more than one domain name.
    The PayPal IPN broadcasts are reaching the correct URL. This is obvious if you look at the Membership 2 Pro "Transaction Logs" on my site. As I said, I have enabled access so someone from technical support can do this.
    You can see in the "Transaction Logs" that the IPN broadcasts are reaching the correct domain. Those relating to subscriptions made via the site have been processed correctly and are in the "successful" category. All of the others that relate to repeat payments for subscriptions not made through Membership 2 Pro are logged as "failed". An "error" is shown in the log as there is no invoice for the payment (there is no invoice because the PayPal subscription was made directly through PayPal and so no invoice was created by Membership 2 Pro).
    PayPal is saying it will disable the broadcasts because they are not being handled correctly when sent to the URL I have entered (which is the correct URL).
    What can I do to stop PayPal disabling IPN broadcasts?

  • Mike

    Dear Vinod,
    Thank you for raising it with the developer, but the solution you link to is not relevant to this problem.
    Let me explain why once again.
    I have people who have PayPal subscriptions that were not set up through Membership 2 Pro. There are no invoices for these people. They are not registered as members in the Membership 2 Pro system. The vast majority are not registered users of my Wordpress site. They took out a subscription to pay membership fees and donations to my organisation via PayPal.
    I have to use the same PayPal account for handling Membership 2 Pro subscriptions - PayPal does not permit you to set up multiple accounts for the same organisation.
    It seems PayPal broadcasts everything to the IPN URL when it processes a repeat payment. The data is sent to the IPN URL regardless of whether the PayPal subscription was set up directly in PayPal or via the Membership 2 Pro plugin. When the data relates to a Membership 2 Pro subscription, everything is fine. But when Membership 2 Pro receives information that has nothing to do with it, it cannot find an associated invoice and so logs this as an "error" and puts the transaction in the "failed" category in the "transaction logs".
    The work around say assign these "failed" transactions to the right user, but there is no registered user for these payments and no invoice. It seems to be a problem for PayPal that the transactions are categorised by Membership 2 Pro as "failed" as it keeps sending me warning messages saying it will disable IPN broadcasts if my service provider does not solve this problem.
    I have been told elsewhere that I have to add the Membership 2 Pro IPN URL to PayPal for the subscription payments that are made through Membership 2 Pro to be handled correctly.
    It seems that Membership 2 Pro response to the IPN broadcast of data that does not relate to it is flagging up problems at the PayPal end.
    So what can I do to stop PayPal from disabling IPN broadcasts?

  • Vinod Dalvi

    Hi Mike,

    Thank you for making it clear by describing it in detail.

    So it seems you are getting the same message as described in the following threads but in your case you are getting it when the members are making direct payments in the Payal.

    https://premium.wpmudev.org/forums/topic/protected-content-using-wrong-instant-payment-notifications-url
    https://premium.wpmudev.org/forums/topic/why-am-i-receiving-paypal-instant-payment-notification-warning

    Right?

    Please correct me if i am wrong.

    I have notified this to the plugin developer to be addressed.

    Regards,
    Vinod Dalvi

  • Mike

    Again, those threads are not really relevant.
    The first one relates to Membership 2 Pro members whose status is deactivated. The PayPal IPN broadcasts that are generating errors in my case do not relate to deactivated members - they relate to people who are not members in the Membership 2 Pro system.
    The second one relates to PayPal IPN broadcasts for payments made outside the Membership 2 Pro system, which is my situation, but there the discussion is about a firewall stopping the messages being exchanged.
    In my case, the IPN broadcasts reach the URL and are processed correctly when the IPN message relates to someone who has subscribed through Membership 2 Pro. Clearly the messages are arriving okay. The problem is when the PayPal IPN message does not relate to a member or invoice in Membership 2 Pro. Membership 2 Pro is correctly detecting there is no registered member or invoice for these payments (inevitable as they were set up outside the Membership 2 Pro system), but the way Membership 2 Pro flags this as an "error" is causing a problem to PayPal.

  • Philipp Stracker

    Hi Mike,

    thank you for posting this issue. I've seen similar reports about that IPN message before but we were not clear why they came up. In M2 all looked good.
    Finally I understand that the reason is payments from other sources that confuse M2 :slight_smile:

    We've added a condition to simply ignore the irrelevant IPN calls in the future; until now M2 returned an error "invalid transaction" to PayPal, which obviously triggered that email messages.

    So starting with next M2 update this should be resolved!
    But as always, if you still have any issue after this then please let us know. We're happy for feedback like this, that helps us identify and fix bugs in the plugin :slight_smile:

    Thanks, Philipp

    p.s. I'll mark this as resolved for now, as we identified the code that triggered the error message for PayPal and fixed it. Feel free to re-open the thread if the problem persists after the next update

  • Mike

    Thanks Philipp (and Vinod). I'm pleased this will be solved in future - but do you have any idea when this update will be ready?
    I'm not sure how long PayPal will give me before disabling the IPN. I have several of these non-M2 payments going through every day.
    Is it better for me to remove the IPN URL until your update is ready?
    If I do remove the IPN URL, presumably when PayPal makes the next M2 member renewal payment this will be lost by the system. What then?

  • Vinod Dalvi

    Hi Mike,

    The updated version of plugin containing fix for this issue will be released ASAP but sorry i can't publish exact ETAs.

    In the meanwhile you can try resolving the issue by implementing the fix for it manually by editing the following Membership 2 Pro plugin file on line number 431 as displayed below.

    Membership 2 Pro plugin file :
    membership/app/gateway/paypalstandard/class-ms-gateway-paypalstandard.php

    Before Editing :

    // PayPal did provide invalid details...
    				status_header( 404 );

    After Editing :

    // PayPal did provide invalid details...
    // status_header( 404 );

    Alternatively just use the attached modified class-ms-gateway-paypalstandard.php file that contains the above fix.

    Best Regards,
    Vinod Dalvi

  • Mike

    Thanks Vinood, but that file does not seem to exist.
    I have gone to my plugins page and clicked on "edit" under Membership 2 Pro.
    This gives me a list of plugin files. This list does not include the file you have named.
    There is a file with the name: membership/app/class-ms-gateway.php
    However, this does not contain the code you refer to above. I note also that its status is "inactive".
    Can you tell me how to access the file in the plugin editor if it should be there?

  • Vinod Dalvi

    Hi Mike,

    You can't see this file in plugin editor as at the present time, the WordPress theme & plugins editor will only allow you to access the top level folder - not any sub-folders.

    See discussion here https://wordpress.org/support/topic/why-not-all-files-are-visible-in-theme-or-plugin-editor

    You can instead try editing it by accessing your site using FTP or cPanel file manager or using the following solutions.

    http://www.wpbeginner.com/plugins/how-to-add-a-ftp-like-file-manager-in-wordpress-with-wp-file-manager/
    https://wordpress.org/plugins/advanced-code-editor/

    Regards,
    Vinod Dalvi

  • Mike

    Thanks. I don't have ftp access to plugin files as the Wordpress system is hosted by my service provider, not on my own domain.
    I have installed the plugin WP-filemanager, but this does not bring up the Membership 2 Pro files. I think this is because it is a plugin included in the standard library and so also hosted by my service provider. I think this means that I cannot edit it unless I install a local version and use that rather than the hosted version - but given the problems I had in importing my members from Membership to Membership 2 Pro, that seems very risky.
    I'll see if my service provider can apply the bug fix directly, pending the update.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.