$errors['payment_processor_id'] = ts('Please select a Payment Method');
}
+ if ($form->showPaymentOnConfirm) {
+ CRM_Core_Payment_Form::validatePaymentInstrument(
+ $fields['payment_processor_id'],
+ $fields,
+ $errors,
+ (!$form->_isBillingAddressRequiredForPayLater ? NULL : 'billing')
+ );
+ }
+
return empty($errors) ? TRUE : $errors;
}
) {
return empty($errors) ? TRUE : $errors;
}
- CRM_Core_Payment_Form::validatePaymentInstrument(
- $fields['payment_processor_id'],
- $fields,
- $errors,
- (!$form->_isBillingAddressRequiredForPayLater ? NULL : 'billing')
- );
+
+ if (!$form->showPaymentOnConfirm) {
+ CRM_Core_Payment_Form::validatePaymentInstrument(
+ $fields['payment_processor_id'],
+ $fields,
+ $errors,
+ (!$form->_isBillingAddressRequiredForPayLater ? NULL : 'billing')
+ );
+ }
}
return empty($errors) ? TRUE : $errors;