list($this->_contributorDisplayName, $this->_contributorEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactId);
- if (!$this->_refund) {
- $this->assignProcessors();
- // also check for billing information
- // get the billing location type
- $this->assignBillingType();
- }
+ $this->assignPaymentRelatedVariables();
$this->assign('contributionMode', $this->_mode);
$this->assign('contactId', $this->_contactId);
$this->assign('paymentAmt', abs($paymentAmt));
$this->setPageTitle($this->_refund ? ts('Refund') : ts('Payment'));
-
- $this->_paymentProcessor = array('billing_mode' => 1);
}
/**
'id' => $type
);
- if ($type == 'CreditCard') {
- $this->add('hidden', 'hidden_CreditCard', 1);
- CRM_Core_Payment_Form::buildCreditCard($this, TRUE);
- }
- elseif ($type == 'DirectDebit') {
- $this->add('hidden', 'hidden_DirectDebit', 1);
- CRM_Core_Payment_Form::buildDirectDebit($this, TRUE);
- }
+ CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE);
+
$qfKey = $this->controller->_key;
$this->assign('qfKey', $qfKey);
$this->assign('allPanes', $allPanes);
//Get the rquire fields value only.
$params = $this->_params = $submittedValues;
- $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($this->_params['payment_processor_id'],
- $this->_mode
- );
-
//get the payment processor id as per mode.
+ //@todo unclear relevance of mode - seems like a lot of duplicated params here!
$this->_params['payment_processor'] = $params['payment_processor_id'] =
- $this->_params['payment_processor_id'] = $submittedValues['payment_processor_id'] = $this->_paymentProcessor['id'];
+ $this->_params['payment_processor_id'] = $submittedValues['payment_processor_id'] = $this->_paymentProcessor['id'];
$now = date('YmdHis');
$fields = array();
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/