X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment%2FBaseIPN.php;h=3976560052fb1a937debca4a8caadf044746a742;hb=9d058543716e160743499ebe0e396daa8bc42afa;hp=aec81aba53fdee9cc3a5efe849ba7dd518917ce2;hpb=9541859723b7e4fcf94020aea37f71a0c486880b;p=civicrm-core.git diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index aec81aba53..3976560052 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -1,7 +1,7 @@ _inputParameters = $parameters; } @@ -142,6 +142,7 @@ class CRM_Core_Payment_BaseIPN { $success = $contribution->loadRelatedObjects($input, $ids, $required); } catch(Exception $e) { + $success = FALSE; if (CRM_Utils_Array::value('log_error', $error_handling)) { CRM_Core_Error::debug_log_message($e->getMessage()); } @@ -326,11 +327,14 @@ class CRM_Core_Payment_BaseIPN { $values['amount'] = $recurContrib->amount; $values['financial_type_id'] = $objects['contributionType']->id; $values['title'] = $source = ts('Offline Recurring Contribution'); - $values['is_email_receipt'] = $recurContrib->is_email_receipt; $domainValues = CRM_Core_BAO_Domain::getNameAndEmail(); $values['receipt_from_name'] = $domainValues[0]; $values['receipt_from_email'] = $domainValues[1]; } + if($recurContrib && $recurContrib->id){ + //CRM-13273 - is_email_receipt setting on recurring contribution should take precedence over contribution page setting + $values['is_email_receipt'] = $recurContrib->is_email_receipt; + } $contribution->source = $source; if (CRM_Utils_Array::value('is_email_receipt', $values)) { @@ -465,6 +469,9 @@ LIMIT 1;"; $values['custom_pre_id'] = $custom_pre_id; $values['custom_post_id'] = $custom_post_ids; + //for tasks 'Change Participant Status' and 'Batch Update Participants Via Profile' case + //and cases involving status updation through ipn + $values['totalAmount'] = $input['amount']; $contribution->source = ts('Online Event Registration') . ': ' . $values['event']['title']; @@ -495,6 +502,7 @@ LIMIT 1;"; $contribution->trxn_id = $input['trxn_id']; $contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date); $contribution->thankyou_date = CRM_Utils_Date::isoToMysql($contribution->thankyou_date); + $contribution->receipt_date = CRM_Utils_Date::isoToMysql($contribution->receipt_date); $contribution->cancel_date = 'null'; if (CRM_Utils_Array::value('check_number', $input)) { @@ -599,7 +607,7 @@ LIMIT 1;"; function getBillingID(&$ids) { // get the billing location type - $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'); + $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate'); // CRM-8108 remove the ts around the Billing locationtype //$ids['billing'] = array_search( ts('Billing'), $locationTypes ); $ids['billing'] = array_search('Billing', $locationTypes);