From 1a9e39533a4d20c05d46c6154b9aad23f2a02e87 Mon Sep 17 00:00:00 2001
From: eileen <eileen@fuzion.co.nz>
Date: Sun, 30 Jun 2013 17:23:41 +1200
Subject: [PATCH] remove BaseIPN::createContact function as all references to
 this function are commented out

---
 CRM/Core/Payment/BaseIPN.php                  | 23 -------------------
 CRM/Core/Payment/PayPalIPN.php                |  5 ----
 CRM/Core/Payment/PayPalProIPN.php             |  5 ----
 CRM/Core/Payment/PaymentExpressIPN.php        |  5 ----
 .../GoogleIPN.php                             |  7 +-----
 5 files changed, 1 insertion(+), 44 deletions(-)

diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php
index 2edd2f1b5e..91813fefbc 100644
--- a/CRM/Core/Payment/BaseIPN.php
+++ b/CRM/Core/Payment/BaseIPN.php
@@ -88,29 +88,6 @@ class CRM_Core_Payment_BaseIPN {
     return TRUE;
   }
 
-  function createContact(&$input, &$ids, &$objects) {
-    $params    = array();
-    $billingID = $ids['billing'];
-    $lookup    = array(
-      'first_name',
-      'last_name',
-      "street_address-{$billingID}",
-      "city-{$billingID}",
-      "state-{$billingID}",
-      "postal_code-{$billingID}",
-      "country-{$billingID}",
-    );
-    foreach ($lookup as $name) {
-      $params[$name] = $input[$name];
-    }
-    if (!empty($params)) {
-      // update contact record
-      $contact = CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray, $ids['contact']);
-    }
-
-    return TRUE;
-  }
-
   /**
    * Load objects related to contribution
    *
diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php
index 934f709cc0..bff959517f 100644
--- a/CRM/Core/Payment/PayPalIPN.php
+++ b/CRM/Core/Payment/PayPalIPN.php
@@ -226,11 +226,6 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
 
     $transaction = new CRM_Core_Transaction();
 
-    // fix for CRM-2842
-    //  if ( ! $this->createContact( $input, $ids, $objects ) ) {
-    //       return false;
-    //  }
-
     $participant = &$objects['participant'];
     $membership = &$objects['membership'];
 
diff --git a/CRM/Core/Payment/PayPalProIPN.php b/CRM/Core/Payment/PayPalProIPN.php
index 67ddcc9629..21682f8e7d 100644
--- a/CRM/Core/Payment/PayPalProIPN.php
+++ b/CRM/Core/Payment/PayPalProIPN.php
@@ -243,11 +243,6 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
 
     $transaction = new CRM_Core_Transaction();
 
-    // fix for CRM-2842
-    //  if ( ! $this->createContact( $input, $ids, $objects ) ) {
-    //       return false;
-    //  }
-
     $participant = &$objects['participant'];
     $membership = &$objects['membership'];
 
diff --git a/CRM/Core/Payment/PaymentExpressIPN.php b/CRM/Core/Payment/PaymentExpressIPN.php
index 3f79fbd53f..9e2e4aa400 100644
--- a/CRM/Core/Payment/PaymentExpressIPN.php
+++ b/CRM/Core/Payment/PaymentExpressIPN.php
@@ -159,11 +159,6 @@ class CRM_Core_Payment_PaymentExpressIPN extends CRM_Core_Payment_BaseIPN {
 
     $transaction = new CRM_Core_Transaction();
 
-    // fix for CRM-2842
-    // if ( ! $this->createContact( $input, $ids, $objects ) ) {
-    //     return false;
-    // }
-
     // check if contribution is already completed, if so we ignore this ipn
 
     if ($contribution->contribution_status_id == 1) {
diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php
index 450172e77f..4199e15eb0 100644
--- a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php
+++ b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php
@@ -151,18 +151,13 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base
     require_once 'CRM/Core/Transaction.php';
     $transaction = new CRM_Core_Transaction();
 
-    // fix for CRM-2842
-    // if ( ! $this->createContact( $input, $ids, $objects ) ) {
-    //     return false;
-    // }
-
     // check if contribution is already completed, if so we ignore this ipn
     if ($contribution->contribution_status_id == 1) {
       CRM_Core_Error::debug_log_message("returning since contribution has already been handled");
       echo "Success: Contribution has already been handled<p>";
     }
     else {
-      /* Since trxn_id hasn't got any use here, 
+      /* Since trxn_id hasn't got any use here,
              * lets make use of it by passing the eventID/membershipTypeID to next level.
              * And change trxn_id to google-order-number before finishing db update */
 
-- 
GitLab