You are here

function paymentmethodbasic_payment_method_configuration_form_elements_validate in Payment 7

Implements form validate callback for paymentmethodbasic_payment_method_configuration_form_elements().

File

modules/paymentmethodbasic/paymentmethodbasic.module, line 157
Hook implementations and shared functions.

Code

function paymentmethodbasic_payment_method_configuration_form_elements_validate(array $element, array &$form_state) {
  $values = drupal_array_get_nested_value($form_state['values'], $element['#parents']);
  $form_state['payment_method']->controller_data['message'] = $values['message']['value'];
  $form_state['payment_method']->controller_data['status'] = $values['status'];
  $form_state['payment_method']->controller_data['text_format'] = $values['message']['format'];
}