$contribParams['line_item'] = $form->_lineItem;
//add contribution record
$contribution = CRM_Contribute_BAO_Contribution::add($contribParams, $ids);
+ if (is_a($contribution, 'CRM_Core_Error')) {
+ $message = CRM_Core_Error::getMessages($contribution);
+ CRM_Core_Error::fatal($message);
+ }
}
// process soft credit / pcp pages
// create an activity record
if ($contribution) {
- CRM_Activity_BAO_Activity::addActivity($contribution, NULL, $targetContactID);
+ CRM_Activity_BAO_Activity::addActivity($contribution, NULL, $targetContactID);
}
$transaction->commit();