$this->addDate('receive_date', ts('Received'), FALSE, array('formatType' => 'activityDateTime'));
$this->add('select', 'payment_instrument_id',
- ts('Paid By'),
+ ts('Payment Method'),
array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::paymentInstrument(),
FALSE, array('onChange' => "return showHideByValue('payment_instrument_id','4','checkNumber','table-row','select',false);")
);
}
if (!empty($params['record_contribution']) && empty($params['payment_instrument_id'])) {
- $errors['payment_instrument_id'] = ts('Paid By is a required field.');
+ $errors['payment_instrument_id'] = ts('Payment Method is a required field.');
}
if (!empty($params['is_different_contribution_contact'])) {
$allMemberStatus = CRM_Member_PseudoConstant::membershipStatus();
$allContributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
- $lineItems = NULL;
- if (!empty($this->_lineItem)) {
- $lineItems = $this->_lineItem;
- }
-
if ($this->_id) {
$ids['membership'] = $params['id'] = $this->_id;
}
$financialType = new CRM_Financial_DAO_FinancialType();
$financialType->id = $params['financial_type_id'];
$financialType->find(TRUE);
+
$contribution = CRM_Contribute_Form_Contribution_Confirm::processFormContribution($this,
$paymentParams,
- $result,
- $this->_contributorContactID,
+ NULL,
+ array(
+ 'contact_id' => $this->_contributorContactID,
+ 'line_item' => $lineItem,
+ 'is_test' => $isTest,
+ 'campaign_id' => CRM_Utils_Array::value('campaign_id', $paymentParams),
+ 'contribution_page_id' => CRM_Utils_Array::value('contribution_page_id', $this->_params),
+ 'source' => CRM_Utils_Array::value('source', $paymentParams, CRM_Utils_Array::value('description', $paymentParams)),
+ 'thankyou_date' => CRM_Utils_Array::value('thankyou_date', $paymentParams),
+ 'payment_instrument_id' => $this->_paymentProcessor['payment_instrument_id'],
+ ),
$financialType,
TRUE,
FALSE,
- $isTest,
- $lineItems,
$this->_bltID
);
// process -
// @see http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=261062657#Payments&AccountsRoadmap-Movetowardsalwaysusinga2-steppaymentprocess
$membershipParams['contribution_status_id'] = CRM_Utils_Array::value('payment_status_id', $result);
+ unset($membershipParams['lineItems']);
$membership = CRM_Member_BAO_Membership::create($membershipParams, $ids);
$params['contribution'] = CRM_Utils_Array::value('contribution', $membershipParams);
unset($params['lineItems']);
CRM_Core_Session::setStatus($statusMsg, ts('Complete'), 'success');
//CRM-15187
// dusplay message when membership type is changed
- if ($this->_id && !in_array($this->_memType, $this->_memTypeSelected)) {
+ if (($this->_action & CRM_Core_Action::UPDATE) && $this->_id && !in_array($this->_memType, $this->_memTypeSelected)) {
CRM_Core_Session::setStatus(
ts('The financial types associated with the old and new membership types are different. You may want to edit the contribution associated with this membership to adjust its financial type.'),
ts('Warning')