latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Reasons for API Notifications not working?

Home Forums Community Forum Reasons for API Notifications not working?

Tagged: ,

This topic contains 35 replies, has 4 voices. Last updated by  Jason (Lead Developer) 4 years, 7 months ago.

Page 2 Of Topic Replies

Viewing 10 replies - 26 through 35 (of 35 total)
Author Replies
Author Replies
Posted: Tuesday Jun 5th, 2012 at 6:59 am #15472

I’ll email Jason asking him about it.

Posted: Tuesday Jun 5th, 2012 at 8:57 pm #15604
Sacha Greif
Username: sachag

This seems like a very relevant paragraph from the docs:

*Quick Tip* In addition to the default IPN settings inside your PayPal® account, the IPN URL is also set on a per-transaction basis by the special PayPal® Button Code that s2Member provides you with. In other words, if you have multiple sites operating on one PayPal® account, that’s OK. s2Member dynamically sets the IPN URL for each transaction. The result is that the IPN URL configured from within your PayPal® account, becomes the default, which is then overwritten on a per-transaction basis. In fact, PayPal® recently updated their system to support IPN URL preservation. One PayPal® account can handle multiple sites, all using different IPN URLs.

So this is what happened: the users who signed up before the domain change still have the old IPN notification URL in their profile. The question now becomes, how can I change it?

Alternatively, the second paragraph provides a possible workaround:

If you’re using a single PayPal® Pro account for multiple cross-domain installations, and you need to receive IPN notifications for each of your domains; you’ll want to create a central IPN processing script that scans variables in each IPN response, forking itself out to each of your individual domains. In rare cases when this is necessary, you’ll find two variables in all IPN responses for s2Member. The originating domain name ( i.e. http://www.nrfight.tv ) will always be included somewhere within, either: custom and/or rp_invoice_id; depending on the type of transaction. These variables can be used to test incoming IPNs, and fork to the proper installation. For your convenience, an example script has been provided inside: /s2m-pro-extras/paypal-central-ipn.php. You can download all Extras here: s2m-pro-extras.zip.

So I’m going to see if that example script can help me implement a script that redirects all the nrfight.com IPN notifications to nrfight.tv.

Posted: Tuesday Jun 5th, 2012 at 10:43 pm #15623

That’s a good idea. Sorry I missed that earlier.

You can also contact PayPal to find out how to change the notification URL for a subscription.

Posted: Tuesday Jun 5th, 2012 at 10:55 pm #15625
Sacha Greif
Username: sachag

That’s what I did. I don’t have high hopes for PayPal support, but we’ll see…

And by the way, I haven’t got the script to work yet. Although the script gets the PayPal POST request, it doesn’t redirect it to the new notification URL. I’m in the process of debugging it, I’ll keep you posted.

Edit: it seems like the cURL call in paypal-central-ipn.php is failing, but I’m not sure why. I understand if it’s out of the scope of this question though.

  • This reply was modified 4 years, 7 months ago by  Sacha Greif.
Posted: Wednesday Jun 6th, 2012 at 8:54 pm #15736
Sacha Greif
Username: sachag

I have confirmed with PayPal support that there is no way to change the IPN url for existing users, unless these users recreate a new account.

My only hope is now to set up the redirection script to redirect notifications from the old site to the new.

Posted: Wednesday Jun 6th, 2012 at 9:05 pm #15739

I have confirmed with PayPal support that there is no way to change the IPN url for existing users, unless these users recreate a new account.

Okay, thanks for the update.

Edit: it seems like the cURL call in paypal-central-ipn.php is failing, but I’m not sure why. I understand if it’s out of the scope of this question though.

Have you tried this script in your server to check if curl works properly? http://www.s2member.com/r/server-check-tool/

Posted: Wednesday Jun 6th, 2012 at 9:09 pm #15740
Sacha Greif
Username: sachag

Just tried it, everything seems to be ok:

http://www.nrfight.tv/s2member-server-check-120526.php

Posted: Thursday Jun 7th, 2012 at 4:35 pm #15838
Staff Member

Thanks for the heads up on this request for support.

@ Sacha Greif

I believe the issue here, is related to PayPal’s IPN processor. Whenever PayPal processes a subscription, is associates each subscription with a URL which will be notified via the PayPal IPN service, whenever changes and/or payments are processed for that subscription.

Actually, PayPal offers two different ways to set this up.

# 1. You can have a single/central IPN URL, which is notified for all subscriptions, regardless of where they originated from (i.e. s2Member, or another site that you operate). The same IPN URL would be contacted for all of them.

This is how s2Member Pro integrates with PayPal Pro, via s2Member Pro Forms.
The PayPal Pro API does not make #2 possible, so a central IPN URL is used with s2Member Pro Forms.
Please configure: PayPal Account -> My Profile -> Instant Payment Notification Preferences


# 2. Or, you can have each transaction automatically submit an IPN URL, so it can handle transactions and/or subscriptions associated with a particular software installation, on a particular domain. This is the method that s2Member prefers (if at all possible), because it allows for multiple installations to be operated under a single PayPal account, and in harmony with any other software that you might be using.

This is how s2Member integrates with PayPal Standard Buttons.

As noted previously though, this is not possible with PayPal Pro.
With PayPal® Pro integration you absolutely MUST set an IPN URL inside your PayPal® account. PayPal® Pro integration does NOT allow the IPN location to be overridden on a per-transaction basis. If you’re using a single PayPal® Pro account for multiple cross-domain installations, and you need to receive IPN notifications for each of your domains; you’ll want to create a central IPN processing script that scans variables in each IPN response, forking itself out to each of your individual domains. In rare cases when this is necessary, you’ll find two variables in all IPN responses for s2Member. The originating domain name will always be included somewhere within, either: custom and/or rp_invoice_id; depending on the type of transaction. These variables can be used to test incoming IPNs, and fork to the proper installation. For your convenience, an example script has been provided inside: /s2m-pro-extras/paypal-central-ipn.php. You can download all Extras here: s2m-pro-extras.zip.

The issue that you’re having…

So the issue here, is that you have customers with subscriptions that were created by PayPal prior to you moving the site (i.e. you changed the originating domain name, and thus, you changed the IPN URL). PayPal is still sending IPN notifications to the original domain, which may not exist any longer, if you moved it.

As far as I know, there is no way to change the original IPN URL that was given to PayPal. This has been a known limitation for quite awhile now. To my knowledge, PayPal has still not made this possible yet.

Possible solutions for you…

Re-establish the original domain (and thus, the original IPN URL that was given to PayPal). Sometimes it is enough just to setup a forwarding script on the old domain, and have that forward IPNs to your new domain, so that s2Member receives them.

Or, you might contact PayPal and ask them to update the IPN URL for any old subscriptions, so that it points to your new s2Member installation, on the new domain that you’re using now. You may need to do some explaining for them, so they are aware that you simply changed the domain name.

Reference articles:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNSetup

Posted: Thursday Jun 7th, 2012 at 7:55 pm #15863
Sacha Greif
Username: sachag

@Jason thanks for dropping by. This is a very good summary of my problem up to now. Since I still have access to the old domain, it seems like the simplest solution would be to set up a forwarding script.

I tried that, and for some reason it’s not working. I created a separate thread about this since it’s a pretty specific issue, and would appreciate any help you can provide:

http://www.s2member.com/forums/topic/help-with-paypal-central-ipn-php-and-ipn/

Posted: Friday Jun 8th, 2012 at 11:51 pm #16033
Staff Member
Sure. I replied to your other thread.
~ I’ll close this one out now.

Reference: http://www.s2member.com/forums/topic/help-with-paypal-central-ipn-php-and-ipn/#post-16022

Viewing 10 replies - 26 through 35 (of 35 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.