You are here

function pay_admin_method_form_submit in Pay 7

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

Submit handler for pay_method_settings.

File

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

Code

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