* @param int $isFirstOrLastRecurringPayment
* Deprecated param only used by AuthorizeNetIPN.
*/
- public static function completeOrder(&$input, &$ids, $objects, $transaction, $recur, $contribution, $isRecurring,
- $isFirstOrLastRecurringPayment) {
+ public static function completeOrder(&$input, &$ids, $objects, $transaction, $recur, $contribution, $isRecurring, $isFirstOrLastRecurringPayment) {
$primaryContributionID = isset($contribution->id) ? $contribution->id : $objects['first_contribution']->id;
// The previous details are used when calculating line items so keep it before any code that 'does something'
if (!empty($contribution->id)) {
$values['receipt_from_email'] = $domainValues[1];
}
+ if (empty($values['receive_date']) && $changeDate) {
+ $contributionParams['receive_date'] = $changeDate;
+ }
+
if ($recurContrib && $recurContrib->id && !isset($input['is_email_receipt'])) {
//CRM-13273 - is_email_receipt setting on recurring contribution should take precedence over contribution page setting
// but CRM-16124 if $input['is_email_receipt'] is set then that should not be overridden.