*
* @var array
*/
- static $_importableFields = NULL;
+ public static $_importableFields = NULL;
/**
* Static field for all the contribution information that we can potentially export
*
* @var array
*/
- static $_exportableFields = NULL;
+ public static $_exportableFields = NULL;
/**
* Static field to hold financial trxn id's.
*
* @var array
*/
- static $_trxnIDs = NULL;
+ public static $_trxnIDs = NULL;
/**
* Field for all the objects related to this contribution
);
}
- CRM_Contact_BAO_GroupContactCache::opportunisticCacheFlush();
+ // reset the group contact cache for this group
+ // HACK: dave hack - these caches are murder!!!
+ // CRM_Contact_BAO_GroupContactCache::opportunisticCacheFlush();
if ($contributionID) {
CRM_Utils_Hook::post('edit', 'Contribution', $contribution->id, $contribution);
return $contribution;
}
- $null = NULL; // return by reference
+ // return by reference
+ $null = NULL;
return $null;
}
// as they would then me membership.contact_id, membership.is_test etc
return civicrm_api3('Membership', 'get', [
'id' => ['IN' => $membershipIDs],
- 'return' => ['id', 'contact_id', 'membership_type_id', 'is_test']
+ 'return' => ['id', 'contact_id', 'membership_type_id', 'is_test'],
])['values'];
}
}
else {
$whereClauses['financial_type_id'] = [
- 'IN (' . implode(',', array_keys($types)) . ')'
+ 'IN (' . implode(',', array_keys($types)) . ')',
];
}
return $whereClauses;
'subject' => ts('Payment failed at payment processor'),
'source_record_id' => $contributionID,
'source_contact_id' => CRM_Core_Session::getLoggedInContactID() ? CRM_Core_Session::getLoggedInContactID() :
- $contactID,
+ $contactID,
));
// CRM-20336 Make sure that the contribution status is Failed, not Pending.
return FALSE;
}
-
/**
* Function to record additional payment for partial and refund contributions.
*
* Line items.
* @param bool $isARefund
* Is this a refund / negative transaction.
+ * @param int $previousLineItemTotal
*
* @return float
*/
* @param float $balance
* @param string $contributionStatus
*
- * @return array $actionLinks Links array containing:
- * -url
- * -title
+ * @return array
+ * $actionLinks Links array containing:
+ * -url
+ * -title
*/
protected static function getContributionPaymentLinks($id, $balance, $contributionStatus) {
if ($contributionStatus === 'Failed' || !CRM_Core_Permission::check('edit contributions')) {
$clauses = [];
foreach ($whereClauses as $key => $clause) {
- $clauses[] = 'b.' . $key . " " . implode(' AND b.' . $key, (array) $clause);
+ $clauses[] = 'b.' . $key . " " . implode(' AND b.' . $key, (array) $clause);
}
$whereClauseString = implode(' AND ', $clauses);