Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-18502 - Fix payment reminder activity creation #8309

Merged
merged 2 commits into from
Jul 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CRM/Pledge/BAO/Pledge.php
Original file line number Diff line number Diff line change
Expand Up @@ -1079,14 +1079,16 @@ public static function updatePledgeStatus($params) {
$activityType,
'name'
),
'activity_date_time' => CRM_Utils_Date::isoToMysql($now),
'due_date_time' => CRM_Utils_Date::isoToMysql($details['scheduled_date']),
'is_test' => $details['is_test'],
'status_id' => 2,
'campaign_id' => $details['campaign_id'],
);
if (is_a(civicrm_api('activity', 'create', $activityParams), 'CRM_Core_Error')) {
$returnMessages[] = "Failed creating Activity for acknowledgment";
try {
civicrm_api3('activity', 'create', $activityParams);
}
catch (CiviCRM_API3_Exception $e) {
$returnMessages[] = "Failed creating Activity for Pledge Reminder: " . $e->getMessage();
return array('is_error' => 1, 'message' => $returnMessages);
}
$returnMessages[] = "Payment reminder sent to: {$pledgerName} - {$toEmail}";
Expand Down