Skip to content

Commit

Permalink
Merge pull request #10229 from civicrm/4.7.19-rc
Browse files Browse the repository at this point in the history
4.7.19 rc
  • Loading branch information
eileenmcnaughton authored Apr 24, 2017
2 parents 57a953d + fce28e5 commit 70ebdf9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions CRM/Contribute/Form/AdditionalPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ public function submit($submittedValues) {
if ($this->_mode) {
// process credit card
$this->assign('contributeMode', 'direct');
$this->processCreditCard($submittedValues);
$submittedValues = $this->_params;
$this->processCreditCard($this->_params);
}

$defaults = array();
Expand All @@ -366,20 +365,20 @@ public function submit($submittedValues) {
'id' => $this->_contributionId,
));
$contributionStatusId = CRM_Utils_Array::value('contribution_status_id', $contribution);
$result = CRM_Contribute_BAO_Contribution::recordAdditionalPayment($this->_contributionId, $submittedValues, $this->_paymentType, $participantId);
$result = CRM_Contribute_BAO_Contribution::recordAdditionalPayment($this->_contributionId, $this->_params, $this->_paymentType, $participantId);
// Fetch the contribution & do proportional line item assignment
$params = array('id' => $this->_contributionId);
$contribution = CRM_Contribute_BAO_Contribution::retrieve($params, $defaults, $params);
CRM_Contribute_BAO_Contribution::addPayments(array($contribution), $contributionStatusId);

$statusMsg = ts('The payment record has been processed.');
// send email
if (!empty($result) && !empty($submittedValues['is_email_receipt'])) {
$submittedValues['contact_id'] = $this->_contactId;
$submittedValues['contribution_id'] = $this->_contributionId;
if (!empty($result) && !empty($this->_params['is_email_receipt'])) {
$this->_params['contact_id'] = $this->_contactId;
$this->_params['contribution_id'] = $this->_contributionId;
// to get 'from email id' for send receipt
$this->fromEmailId = $submittedValues['from_email_address'];
$sendReceipt = $this->emailReceipt($submittedValues);
$this->fromEmailId = $this->_params['from_email_address'];
$sendReceipt = $this->emailReceipt($this->_params);
if ($sendReceipt) {
$statusMsg .= ' ' . ts('A receipt has been emailed to the contributor.');
}
Expand Down

0 comments on commit 70ebdf9

Please sign in to comment.