/**
* Store input array on the class
+ *
* @param array $parameters
- * @throws CRM_Core_Exceptions
+ *
+ * @throws CRM_Core_Exception
*/
function setInputParameters($parameters) {
if(!is_array($parameters)) {
* Load objects related to contribution
*
* @input array information from Payment processor
+ *
+ * @param $input
* @param array $ids
* @param array $objects
* @param boolean $required
* @param integer $paymentProcessorID
* @param array $error_handling
+ *
* @return multitype:number NULL |boolean
*/
function loadObjects(&$input, &$ids, &$objects, $required, $paymentProcessorID, $error_handling = NULL) {
return TRUE;
}
+ /**
+ * @param $objects
+ * @param $transaction
+ * @param array $input
+ *
+ * @return bool
+ */
function cancelled(&$objects, &$transaction, $input = array()) {
$contribution = &$objects['contribution'];
$memberships = &$objects['membership'];
return TRUE;
}
+ /**
+ * @param $objects
+ * @param $transaction
+ *
+ * @return bool
+ */
function unhandled(&$objects, &$transaction) {
$transaction->rollback();
// we dont handle this as yet
return FALSE;
}
+ /**
+ * @param $input
+ * @param $ids
+ * @param $objects
+ * @param $transaction
+ * @param bool $recur
+ */
function completeTransaction(&$input, &$ids, &$objects, &$transaction, $recur = FALSE) {
$contribution = &$objects['contribution'];
$memberships = &$objects['membership'];
$dates['end_date'],
$dates['join_date'],
'today',
- TRUE
+ TRUE,
+ $membership->membership_type_id,
+ (array) $membership
);
$formatedParams = array('status_id' => CRM_Utils_Array::value('id', $calcStatus, 2),
CRM_Core_Error::debug_log_message("Success: Database updated");
}
+ /**
+ * @param $ids
+ *
+ * @return bool
+ */
function getBillingID(&$ids) {
// get the billing location type
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate');
* @params bool $returnMessageText Should text be returned instead of sent. This
* is because the function is also used to generate pdfs
*/
+ /**
+ * @param $input
+ * @param $ids
+ * @param $objects
+ * @param $values
+ * @param bool $recur
+ * @param bool $returnMessageText
+ *
+ * @return mixed
+ */
function sendMail(&$input, &$ids, &$objects, &$values, $recur = FALSE, $returnMessageText = FALSE) {
$contribution = &$objects['contribution'];
$input['is_recur'] = $recur;
* The pledge payment record should already exist & will need to be updated with the new contribution ID.
* If not the contribution will also need to be linked to the pledge
*/
+ /**
+ * @param $contribution
+ */
function updateRecurLinkedPledge(&$contribution) {
$returnProperties = array('id', 'pledge_id');
$paymentDetails = $paymentIDs = array();
);
}
+ /**
+ * @param $recurId
+ * @param $contributionId
+ * @param $input
+ */
function addrecurLineItems($recurId, $contributionId, &$input) {
$lineSets = $lineItems = array();
// function to copy custom data of the
// initial contribution into its recurring contributions
+ /**
+ * @param $recurId
+ * @param $targetContributionId
+ */
function copyCustomValues($recurId, $targetContributionId) {
if ($recurId && $targetContributionId) {
// get the initial contribution id of recur id
// function to copy soft credit record of first recurring contribution
// and add new soft credit against $targetContributionId
+ /**
+ * @param $recurId
+ * @param $targetContributionId
+ */
function addrecurSoftCredit($recurId, $targetContributionId) {
$contriID = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $recurId, 'id', 'contribution_recur_id');