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('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);
}
/**
- * @param CRM_Contribute_Form_Contribution| CRM_Contribute_Form_Contribution_Main|CRM_Core_Payment_ProcessorForm $form
+ * @param CRM_Contribute_Form_AbstractEditPayment|CRM_Contribute_Form_Contribution_Main|CRM_Core_Payment_ProcessorForm $form
* @param array $processor array of properties including 'object' as loaded from CRM_Financial_BAO_PaymentProcessor::getPaymentProcessors
* @param bool $isBillingDataOptional This manifests for 'NULL' (pay later) payment processor as the addition of billing fields to the form and
* for payment processors that gather payment data on site as rendering the fields as not being required. (not entirely sure why but this