[#31] only create memberships on initial payments

This commit is contained in:
B. Endres 2020-06-19 15:13:31 +02:00
parent 25a040f6d8
commit 4ec0fef825

View file

@ -704,7 +704,10 @@ function civicrm_api3_twingle_donation_Submit($params) {
$membership_type_id = $profile->getAttribute('membership_type_id_recur');
}
else {
$membership_type_id = $profile->getAttribute('membership_type_id');
// only create memberships, if this isn't an installment
if (empty($params['parent_trx_id'])) {
$membership_type_id = $profile->getAttribute('membership_type_id');
}
}
if (!empty($membership_type_id)) {
// create the membership