// contribution amount same as membership amount.
//@todo - merge with section above
if ($this->_membershipBlock['is_separate_payment']
+ && !empty($this->_values['fee'][$priceField->id])
&& CRM_Utils_Array::value('name', $this->_values['fee'][$priceField->id]) == 'contribution_amount'
&& CRM_Utils_Array::value("price_{$priceField->id}", $this->_params) == '-1'
) {
'membership_id'
);
}
-
+
$params['skipLineItem'] = TRUE;
-
+
//record contribution for this membership
if (!empty($params['contribution_status_id']) && empty($params['relate_contribution_id'])) {
$memInfo = array_merge($params, array('membership_id' => $membership->id));
$params['contribution'] = self::recordMembershipContribution($memInfo, $ids);
}
-
+
if (!empty($params['lineItems'])) {
$params['line_item'] = $params['lineItems'];
}
if (empty($ids['contribution']) && !empty($ids['membership'])) {
CRM_Price_BAO_LineItem::deleteLineItems($ids['membership'], 'civicrm_membership');
}
-
+
if (!empty($params['line_item']) && empty($ids['contribution'])) {
CRM_Price_BAO_LineItem::processPriceSet($membership->id, $params['line_item'], CRM_Utils_Array::value('contribution', $params));
}
$result = $membershipContribution = NULL;
$isTest = CRM_Utils_Array::value('is_test', $membershipParams, FALSE);
$errors = $createdMemberships = array();
-
+
if ($isPaidMembership) {
$result = CRM_Contribute_BAO_Contribution_Utils::processConfirm($form, $membershipParams,
$premiumParams, $contactID,
$form->set('membership_trx_id', $result['trxn_id']);
$form->set('membership_amount', $minimumFee);
+ $form->assign('membership_trx_id', $result['trxn_id']);
+ $form->assign('membership_amount', $minimumFee);
+
// we don't need to create the user twice, so lets disable cms_create_account
// irrespective of the value, CRM-2888
$tempParams['cms_create_account'] = 0;