bug-fix in soft credit creation

This commit is contained in:
Marc Michalsky forumZFD 2021-02-22 20:03:02 +01:00
parent fe927c4d39
commit c20c4ab16c
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
2 changed files with 13 additions and 10 deletions

View file

@ -138,14 +138,17 @@ class CRM_TwingleCampaign_Utils_APIWrapper {
'amount' => $contribution['total_amount'],
'currency' => $contribution['currency'],
'contact_id' => $event['contact_id'],
'soft_credit_type' => 'twingle_event',
'soft_credit_type_id' => 'twingle_event_donation',
]);
} catch (CiviCRM_API3_Exception $e) {
Civi::log()->error(
E::LONG_NAME .
' could not create TwingleProject: ' .
$e->getMessage(),
$project->getResponse()
' could not create soft credit: ',
[
'contact_id' => $event['contact_id'],
'contact' => $event['contact'],
'contribution_id' => $contribution['id'],
]
);
}
}

View file

@ -1,6 +1,6 @@
{
"twingle_event": {
"name": "twingle_event",
"twingle_event_donation": {
"name": "twingle_event_donation",
"label": "Twingle Event",
"description": "A soft credit type for TwingleEvent initiators.",
"option_group_id": "soft_credit_type"