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'], 'amount' => $contribution['total_amount'],
'currency' => $contribution['currency'], 'currency' => $contribution['currency'],
'contact_id' => $event['contact_id'], 'contact_id' => $event['contact_id'],
'soft_credit_type' => 'twingle_event', 'soft_credit_type_id' => 'twingle_event_donation',
]); ]);
} catch (CiviCRM_API3_Exception $e) { } catch (CiviCRM_API3_Exception $e) {
Civi::log()->error( Civi::log()->error(
E::LONG_NAME . E::LONG_NAME .
' could not create TwingleProject: ' . ' could not create soft credit: ',
$e->getMessage(), [
$project->getResponse() 'contact_id' => $event['contact_id'],
'contact' => $event['contact'],
'contribution_id' => $contribution['id'],
]
); );
} }
} }

View file

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