Answers.Body: <p>I've been trying to reverse engineer this problem also, and here's my partial answer so far:</p>
  
  <ol>
  <li><p>It seems like the IPN is a post back to a url specified in the initial request. I don't see any way to change that postback url for an existing recurring contribution. </p></li>
  <li><p>The Ubercart postback url looks like  <code>/uc_recurring_hosted/paypal/ipn/&lt;id&gt;</code></p></li>
  <li><p>The CiviCRM postback url looks like
  <code>&lt;path to civicrm module directory&gt;/civicrm/extern/ipn.php</code></p></li>
  </ol>
  
  <p>So .. part one is to set up an apache rewrite rule to redirect that POST to the civicrm one.</p>
  
  <p>Having done that, the next trick will be for civicrm to actually handle that IPN - to do that, you'd need some records in civicrm (i.e. the contribution_recur table) that allow civicrm to handle the ipn.</p>
  
  <p>If you inspect a successful Paypal recurring contribution in CiviCRM, it should give you enough clues about what you need to add for the 'migrated' recurring contribution.</p>
  
  <p>Of course, this will only work if the contents of the POST are not specific to ubercart vs. civicrm. The fact that the ubercart postback includes an id, but the civicrm doesn't is a little bit of a flag, but we'll have to see ...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-11T05:39:23.887Z
Answers.Text: I have an answer that details the trick to doing the redirect here: http://civicrm.stackexchange.com/a/4326/12
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-10T13:42:42.883Z
Answers.LastActivityDate: 2016-02-10T13:42:42.883Z
Answers.UserDisplayName: Alan Dixon
Body: <p>This is a copy of <a href="http://forum.civicrm.org/index.php/topic,36181.msg153886.html#msg153886" rel="nofollow">this thread</a> from the forum, since the forum is deprecated for answering questions.</p>
  
  <p>Similarly to this thread (see the above forum post for the link, I can't post it b/c of stack exchange limitations), which describes bringing ARB information from Authorize into Civicrm in order to have Civicrm manage memberhips and renewals on existing recurring payments, I am wanting to switch from Ubercart, which has a bunch of existing recurring Paypal payments for membership roles on the site, to Civicrm. Would it be possible to, in a similar way, migrate the IPN data into CiviCRM and have Civi listen for IPN's? Or is the ipn url entered in Paypal on a per-transaction basis in a way that's difficult to change? (Or, more deviously, if it's too difficult to change the url, could CiviCRM override the notification url provided by Ubercart so that it can read them too before passing along to ubercart?)</p>
  
  <p>-- or --</p>
  
  <p>Another approach was to just use code to sync membership payments to Civi from Ubercart. It seems this might be easier. A more recent response from petednz, <a href="http://forum.civicrm.org/index.php/topic,32376.msg153915.html#msg153915" rel="nofollow">http://forum.civicrm.org/index.php/topic,32376.msg153915.html#msg153915</a> , was to use Rules to do the same thing. However, as I am trying to sync membership payments from ubercart to CiviCRM until people's cc's have expired and they sign back up with Civi, and the Drupal 6 versions of the Rules-related modules don't seem to have the actions necessary to create contribution records or update memberships, I wonder if writing module code is the best way to go.</p>
  
  <p>What do people think is the best approach to this problem? Am I missing something in Rules that would allow me to enter a contribution towards a membership in Civicrm when Ubercart gets notified of a recurring payment (and, for that matter, create the membership in Civi if it doesn't exist yet)? Thanks.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-21T18:20:23.263Z
Comments.Text: We recently exported the recurring monthly donations from a Canadian payment processor, Moneris, and pulled them in to CiviCRM using a custom import. This allows our new version of the plugin for Moneris to change and delete the pre-existing recurring donations. Each month's payment gets a different unique ID. (Of course, Moneris requires credit card info to be entered in order to change or cancel the recurring donation. )
Comments.UserDisplayName: Joe Murray
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-22T02:51:20.770Z
Comments.Text: Darn - I didn't see this until now. Can stackexchange send email notifications? Do you mean that civicrm started receiving IPNs too?
Comments.UserDisplayName: jakew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-22T04:19:01.553Z
Comments.Text: Hmm. My Android StackExhange app notifies when there is a comment on a post of mine. Wrt IPN, unfortunately Moneris doesn't provide them ever. The  plugin has a cron that inserts new recurring donations and the reconciliation with the bank statement has to catch when a credit card payment fails to go through.
Comments.UserDisplayName: Joe Murray
Tags: <civicontribute><civimember><ubercart><paypal>
Title: Migrating IPN's from Ubercart to Civicrm, OR syncing membership payments from Ubercart to membersips/contributions in Civi
ThreadText: # Migrating IPN's from Ubercart to Civicrm, OR syncing membership payments from Ubercart to membersips/contributions in Civi
  
  (Asked by: username_0 on 2015-04-21)
  
  This is a copy of [this thread](http://forum.civicrm.org/index.php/topic,36181.msg153886.html#msg153886) from the forum, since the forum is deprecated for answering questions.
  
  Similarly to this thread (see the above forum post for the link, I can't post it b/c of stack exchange limitations), which describes bringing ARB information from Authorize into Civicrm in order to have Civicrm manage memberhips and renewals on existing recurring payments, I am wanting to switch from Ubercart, which has a bunch of existing recurring Paypal payments for membership roles on the site, to Civicrm. Would it be possible to, in a similar way, migrate the IPN data into CiviCRM and have Civi listen for IPN's? Or is the ipn url entered in Paypal on a per-transaction basis in a way that's difficult to change? (Or, more deviously, if it's too difficult to change the url, could CiviCRM override the notification url provided by Ubercart so that it can read them too before passing along to ubercart?)
  
  -- or --
  
  Another approach was to just use code to sync membership payments to Civi from Ubercart. It seems this might be easier. A more recent response from petednz, <http://forum.civicrm.org/index.php/topic,32376.msg153915.html#msg153915> , was to use Rules to do the same thing. However, as I am trying to sync membership payments from ubercart to CiviCRM until people's cc's have expired and they sign back up with Civi, and the Drupal 6 versions of the Rules-related modules don't seem to have the actions necessary to create contribution records or update memberships, I wonder if writing module code is the best way to go.
  
  What do people think is the best approach to this problem? Am I missing something in Rules that would allow me to enter a contribution towards a membership in Civicrm when Ubercart gets notified of a recurring payment (and, for that matter, create the membership in Civi if it doesn't exist yet)? Thanks.
  
  **Tags:** civicontribute, civimember, ubercart, paypal
  
  > **Comments:**
  > **username_1**: We recently exported the recurring monthly donations from a Canadian payment processor, Moneris, and pulled them in to CiviCRM using a custom import. This allows our new version of the plugin for Moneris to change and delete the pre-existing recurring donations. Each month's payment gets a different unique ID. (Of course, Moneris requires credit card info to be entered in order to change or cancel the recurring donation. )  
  > **username_0**: Darn - I didn't see this until now. Can stackexchange send email notifications? Do you mean that civicrm started receiving IPNs too?  
  > **username_1**: Hmm. My Android StackExhange app notifies when there is a comment on a post of mine. Wrt IPN, unfortunately Moneris doesn't provide them ever. The  plugin has a cron that inserts new recurring donations and the reconciliation with the bank statement has to catch when a credit card payment fails to go through.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-02-10. Score: 1
  
  I've been trying to reverse engineer this problem also, and here's my partial answer so far:
  
  1. It seems like the IPN is a post back to a url specified in the initial request. I don't see any way to change that postback url for an existing recurring contribution.
  2. The Ubercart postback url looks like `/uc_recurring_hosted/paypal/ipn/`
  3. The CiviCRM postback url looks like
     `/civicrm/extern/ipn.php`
  
  So .. part one is to set up an apache rewrite rule to redirect that POST to the civicrm one.
  
  Having done that, the next trick will be for civicrm to actually handle that IPN - to do that, you'd need some records in civicrm (i.e. the contribution\_recur table) that allow civicrm to handle the ipn.
  
  If you inspect a successful Paypal recurring contribution in CiviCRM, it should give you enough clues about what you need to add for the 'migrated' recurring contribution.
  
  Of course, this will only work if the contents of the POST are not specific to ubercart vs. civicrm. The fact that the ubercart postback includes an id, but the civicrm doesn't is a little bit of a flag, but we'll have to see ...
  
  > **Comments:**
  > **username_3**: I have an answer that details the trick to doing the redirect here: http://civicrm.stackexchange.com/a/4326/12  
  
  ---
  
  