//CRM-13981, create new soft-credit record as to record payment from different person for this membership
if (!empty($contributionSoftParams)) {
- $contributionSoftParams['contribution_id'] = $contribution->id;
- $contributionSoftParams['currency'] = $contribution->currency;
- $contributionSoftParams['amount'] = $contribution->total_amount;
- CRM_Contribute_BAO_ContributionSoft::add($contributionSoftParams);
+ foreach ($contributionSoftParams as $contributionSoft){
+ $contributionSoft['contribution_id'] = $contribution->id;
+ $contributionSoft['currency'] = $contribution->currency;
+ $contributionSoft['amount'] = $contribution->total_amount;
+ CRM_Contribute_BAO_ContributionSoft::add($contributionSoft);
+ }
}
// store contribution id