Commit 88576345 authored by jenlampton's avatar jenlampton

Fix typo in amount variable.

parent 335fce67
......@@ -203,14 +203,16 @@ function authorizenetwebform_webform_client_form_validate($form, &$form_state) {
// Get the amount.
$field_values = _authorizenetwebform_flatten_form_values($form_state['values']['submitted']);
$amount_key = $flipped_map['x_amount'];
$amount = $field_values[$amount_key];
// Do not allow submission with zero dollar amount.
if (empty($ammount)) {
$string = t('The amount must be greater than 0.');
drupal_set_message($string, 'error');
// Stop the submission.
$form_state['rebuild'] = TRUE;
if (isset($field_values[$amount_key])) {
$amount = $field_values[$amount_key];
// Do not allow submission with zero dollar amount.
if (empty($amount)) {
$string = t('The amount must be greater than 0.');
drupal_set_message($string, 'error');
// Stop the submission.
$form_state['rebuild'] = TRUE;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment