This has been marked deprecated, but still called for a long timme.
Now that it is just a one-liner I think it's cleaner if the core processors that use it do the one line
directly
return TRUE;
}
- $this->completeTransaction($input, $ids, $objects);
+ 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);
// Only Authorize.net does this so it is on the a.net class. If there is a need for other processors
// to do this we should make it available via the api, e.g as a parameter, changing the nuance
* @throws \CiviCRM_API3_Exception
*/
public function completeTransaction($input, $ids, $objects) {
+ CRM_Core_Error::deprecatedFunctionWarning('Use Payment.create api');
CRM_Contribute_BAO_Contribution::completeOrder($input, [
'related_contact' => $ids['related_contact'] ?? NULL,
'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL,
return;
}
- $this->completeTransaction($input, $ids, $objects);
+ 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);
}
/**
return;
}
- $this->completeTransaction($input, $ids, $objects);
+ 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);
}
/**