* @param array $input
* @param array $ids
* @param array $objects
- * @param CRM_Core_Transaction $transaction
- * It is not recommended to pass this in. The calling function handle it's own roll back if it wants it.
* @param bool $isPostPaymentCreate
* Is this being called from the payment.create api. If so the api has taken care of financial entities.
* Note that our goal is that this would only ever be called from payment.create and never handle financials (only
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
- public static function completeOrder($input, &$ids, $objects, $transaction = NULL, $isPostPaymentCreate = FALSE) {
- if (!$transaction) {
- $transaction = new CRM_Core_Transaction();
- }
+ public static function completeOrder($input, &$ids, $objects, $isPostPaymentCreate = FALSE) {
+ $transaction = new CRM_Core_Transaction();
$contribution = $objects['contribution'];
$primaryContributionID = $contribution->id ?? $objects['first_contribution']->id;
// The previous details are used when calculating line items so keep it before any code that 'does something'
}
$input['card_type_id'] = $params['card_type_id'] ?? NULL;
$input['pan_truncation'] = $params['pan_truncation'] ?? NULL;
- return CRM_Contribute_BAO_Contribution::completeOrder($input, $ids, $objects, NULL,
+ return CRM_Contribute_BAO_Contribution::completeOrder($input, $ids, $objects,
$params['is_post_payment_create'] ?? NULL);
}