$now = date('YmdHis');
- // fix dates that already exist
- $dates = ['create', 'start', 'end', 'cancel', 'modified'];
- foreach ($dates as $date) {
- $name = "{$date}_date";
- if ($recur->$name) {
- $recur->$name = CRM_Utils_Date::isoToMysql($recur->$name);
- }
- }
-
$sendNotification = FALSE;
$subscriptionPaymentStatus = NULL;
//List of Transaction Type
// CRM-13737 - am not aware of any reason why payment_date would not be set - this if is a belt & braces
$objects['contribution']->receive_date = !empty($input['payment_date']) ? date('YmdHis', strtotime($input['payment_date'])) : $now;
- $this->single($input, $ids, $objects, TRUE, $first);
+ $this->single($input, [
+ 'related_contact' => $ids['related_contact'] ?? NULL,
+ 'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL,
+ 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL,
+ ], $objects, TRUE, $first);
}
/**
return;
}
- CRM_Contribute_BAO_Contribution::completeOrder($input, [
- 'related_contact' => $ids['related_contact'] ?? NULL,
- 'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL,
- 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL,
- ], $objects);
+ CRM_Contribute_BAO_Contribution::completeOrder($input, $ids, $objects['contribution']);
}
/**
return;
}
+ $input['payment_processor_id'] = $paymentProcessorID;
+
self::$_paymentProcessor = &$objects['paymentProcessor'];
//?? how on earth would we not have component be one of these?
// they are the only valid settings & this IPN file can't even be called without one of them
return;
}
}
- $this->single($input, $ids, $objects, FALSE, FALSE);
+ $this->single($input, [
+ 'related_contact' => $ids['related_contact'] ?? NULL,
+ 'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL,
+ 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL,
+ ], $objects, FALSE, FALSE);
}
catch (CRM_Core_Exception $e) {
Civi::log()->debug($e->getMessage());