}
}
}
-
- if (CRM_Utils_Array::value('hidden_processor', $_POST)) {
- $this->set('type', CRM_Utils_Array::value('payment_processor', $_POST));
- $this->set('mode', $this->_mode);
- $this->set('paymentProcessor', $this->_paymentProcessor);
-
- CRM_Core_Payment_ProcessorForm::preProcess($this);
- CRM_Core_Payment_ProcessorForm::buildQuickForm($this);
- }
}
function setDefaultValues() {
$form->assign('ppType', FALSE);
$form->_ppType = NULL;
if (!empty($paymentProcessors)) {
+ // Fetch type during form post
+ if (CRM_Utils_Array::value('hidden_processor', $_POST)) {
+ $form->_ppType = CRM_Utils_Array::value('payment_processor', $_POST);
+ $form->set('type', $form->_ppType);
+ $form->set('mode', $form->_mode);
+ $form->set('paymentProcessor', $form->_paymentProcessor);
+ }
// Fetch type during ajax request
- if (isset($_GET['type']) && $form->_snippet) {
+ elseif (isset($_GET['type']) && $form->_snippet) {
$form->_ppType = $_GET['type'];
}
// Set default payment processor
if ($this->_allowConfirmation) {
CRM_Event_Form_EventFees::preProcess($this);
}
-
- if (CRM_Utils_Array::value('hidden_processor', $_POST)) {
- $this->set('type', CRM_Utils_Array::value('payment_processor', $_POST));
- $this->set('mode', $this->_mode);
- $this->set('paymentProcessor', $this->_paymentProcessor);
-
- CRM_Core_Payment_ProcessorForm::preProcess($this);
- CRM_Core_Payment_ProcessorForm::buildQuickForm($this);
- }
-
}
/**