You are here

function pay_admin_method_form_submit in Pay 6

Same name and namespace in other branches
  1. 7 includes/pay.admin.inc \pay_admin_method_form_submit()

Submit handler for pay_method_settings.

File

includes/pay.admin.inc, line 200
Administration form settings and related functions.

Code

function pay_admin_method_form_submit($form, &$form_state) {
  if (!$form['#pay_method']) {
    if ($form_state['values']['pay_method']) {
      if (!count($form_state['storage'])) {
        $form_state['storage'] = $form_state['values'];
        $form_state['rebuild'] = TRUE;
        return;
      }
    }
  }
  else {
    $form_state['redirect'] = 'admin/settings/pay';
    unset($form_state['rebuild'], $form_state['storage']);
  }
}