}
// Build payment processor form
- if (($this->_paymentProcessorID || $this->_isBillingAddressRequiredForPayLater) && empty($_GET['onbehalf'])) {
+ if (empty($_GET['onbehalf'])) {
CRM_Core_Payment_ProcessorForm::buildQuickForm($this);
// Return if we are in an ajax callback
if ($this->_snippet) {
);
$this->addRule("email-{$this->_bltID}", ts('Email is not valid.'), 'email');
$pps = array();
+ //@todo - this should be replaced by a check as to whether billing fields are set
$onlinePaymentProcessorEnabled = FALSE;
if (!empty($this->_paymentProcessors)) {
foreach ($this->_paymentProcessors as $key => $name) {
if ($form->_paymentProcessors) {
// Fetch type during ajax request
if (isset($_GET['type']) && $form->_snippet) {
- $form->_paymentProcessorID = $_GET['type'];
+ $form->_paymentProcessorID = CRM_Utils_Request::retrieve('type', 'Integer', CRM_Core_DAO::$_nullObject, FALSE, 0);
}
// Remember type during form post
elseif (!empty($form->_submitValues)) {
if ($form->_paymentProcessorID) {
CRM_Core_Payment_ProcessorForm::preProcess($form);
}
+ else {
+ $form->_paymentProcessor = array();
+ }
//get payPal express id and make it available to template
foreach ($form->_paymentProcessors as $ppId => $values) {