From 1c2349354da59df86668baa8d9ec67dc50413dd2 Mon Sep 17 00:00:00 2001 From: Lisa Marie Maginnis Date: Wed, 30 Dec 2015 17:30:39 -0500 Subject: [PATCH] fixed billingid, exluding pending from duplicates --- trustcommerceIPN.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trustcommerceIPN.php b/trustcommerceIPN.php index b09992d..a2e5fc6 100644 --- a/trustcommerceIPN.php +++ b/trustcommerceIPN.php @@ -94,7 +94,7 @@ class CRM_Core_Payment_trustcommerce_IPN extends CRM_Core_Payment_BaseIPN { protected function checkDuplicate($input, $ids) { // $sql='select id from civicrm_contribution where receive_date like \''.$input['date'].'%\' and total_amount='.$input['amount'].' and contact_id='.$ids['contact'].' and contribution_status_id = 1 limit 1'; - $sql="select id from civicrm_contribution where trxn_id = '".$ids['trxn_id']."'"; + $sql="select id from civicrm_contribution where trxn_id = '".$ids['trxn_id']."' and contribution_status_id != 2"; $result = CRM_Core_DAO::executeQuery($sql); @@ -239,7 +239,7 @@ class CRM_Core_Payment_trustcommerce_IPN extends CRM_Core_Payment_BaseIPN { if (!$ids['contributionRecur']) { CRM_Core_Error::debug_log_message("Could not find billingid: ".$billingid); - echo "Failure: Could not find contributionRecur

\n"; + echo "Failure: Could not find contributionRecur: $billingid

\n"; exit(); } -- 2.25.1