uc_payment_gateway_select_form

  1. drupal
    1. 6 uc_payment.admin.inc function
    2. 7 uc_payment.admin.inc function
Drupal 7 uc_payment_gateway_select_form($form, &$form_state, $options, $method, $order_id, $amount, $data)

Form builder: Selects a specific payment gateway.

See also

uc_payment_gateway_select_form_submit()

Related topics

1 string reference to 'uc_payment_gateway_select_form'

File

sites/all/modules/ubercart/payment/uc_payment/uc_payment.admin.inc, line 147
Payment administration menu items.

Code

function uc_payment_gateway_select_form($form, &$form_state, $options, $method, $order_id, $amount, $data) {
  $form['method'] = array(
    '#type' => 'hidden', 
    '#value' => $method,
  );
  $form['order_id'] = array(
    '#type' => 'hidden', 
    '#value' => $order_id,
  );
  $form['amount'] = array(
    '#type' => 'hidden', 
    '#value' => $amount,
  );
  $form['p_data'] = array(
    '#type' => 'hidden', 
    '#value' => $data,
  );
  $form['p_selected'] = array(
    '#type' => 'select', 
    '#title' => t('Use gateway'), 
    '#options' => $options, 
    '#default_value' => variable_get('uc_payment_' . $method . '_gateway', ''),
  );
  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit', 
    '#value' => t('Process'),
  );

  return $form;
}