* CRM-20703 - Event Contribution Created When No Payment Option Provided
* throw form rule when amount block is active
$errors['pay_later_receipt'] = ts('Please enter the instructions to be sent to the contributor when they choose to \'pay later\'.');
}
}
+ else {
+ if ($fields['amount_block_is_active'] && empty($fields['payment_processor'])) {
+ $errors['payment_processor'] = ts('You have listed fixed contribution options or selected a price set, but no payment option has been selected. Please select at least one payment processor and/or enable the pay later option.');
+ }
+ }
// don't allow price set w/ membership signup, CRM-5095
if ($priceSetId = CRM_Utils_Array::value('price_set_id', $fields)) {
$errors['pay_later_receipt'] = ts('Please enter the Pay Later instructions to be displayed to your users.');
}
}
+ else {
+ if (empty($values['payment_processor'])) {
+ $errors['payment_processor'] = ts('You have indicated that this is a paid event, but no payment option has been selected. If this is not a paid event, please select the "No" option at the top of the page. If this is a paid event, please select at least one payment processor and/or enable the pay later option.');
+ }
+ }
}
return empty($errors) ? TRUE : $errors;
}