I would like to move my civi install to a new domain. I am able to change paypal IPN to new domain. But for all previous recurring contribution via paypal, i can't change the urls. what can be done?
I ran into this problem today, and found my solution.
Folks who are saying that you can change the IPN URL on an existing Paypal recurring payment are incorrect; you can't, you can only change the IPN URL for future notifications.
I was able to use a rewrite to redirect from Drupal to Wordpress, as follows:
RewriteRule ^sites/all/modules/civicrm/extern/ipn.php$ https://mysite.org/wp-content/plugins/civicrm/civicrm/extern/ipn.php [R=307,L]
The magic is the
R=307. A 307 redirect indicates that a POST request must be resent as a POST. Otherwise you lose the IPN data.
PayPal stores these URLs so there is no way to change this in CiviCRM, nor any other application in fact.
There is a way to change the URL via PayPal's site, however. For details how to do that, refer to Change the IPN url on existing subscription
You can actually change the IPN URL in PayPal settings. For previously failed IPN calls to a historic URL you can resend the messages from PayPal's control panel to the new URL.
In PayPal. Profile and Settings -> Selling Preferences -> Instant Payment Notification (IPN)
Change the notification URL here. Then click on the link to IPN history and run a search (this only shows the last 28 days worth though for me).
With the results showing Check a box at the top of the list which says apply profile and there will be a drop down box to resend the IPNs to the new URL.
Civi does not have the facility to do this. Your best bet is to check and see if you can do this in paypal directly or via the API. You might also experiment with setting up a redirect from the old to the new (not sure if this will work, since it is a POST request from paypal servers)
Please report back your findings. I suspect more and more folks will start running into this issue