You are here

function uc_payment_gateway_select_form in Ubercart 6.2

Same name and namespace in other branches
  1. 5 payment/uc_payment/uc_payment.module \uc_payment_gateway_select_form()

Form builder: Selects a specific payment gateway.

See also

uc_payment_gateway_select_form_submit()

1 string reference to 'uc_payment_gateway_select_form'
uc_payment_gateway_select in payment/uc_payment/uc_payment.admin.inc
Selects a specific gateway when multiple gateways are available.

File

payment/uc_payment/uc_payment.admin.inc, line 290
Payment administration menu items.

Code

function uc_payment_gateway_select_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['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Process'),
  );
  return $form;
}