You are here

function pay_method_gateway::settings_form in Pay 6

Same name and namespace in other branches
  1. 7 includes/handlers/pay_method_gateway.inc \pay_method_gateway::settings_form()

Overrides pay_method::settings_form

File

includes/handlers/pay_method_gateway.inc, line 354
The base class for credit card payment activities.

Class

pay_method_gateway
@file The base class for credit card payment activities.

Code

function settings_form(&$form, &$form_state) {
  parent::settings_form($form, $form_state);
  $group = $this
    ->handler();
  $form[$group]['gateway'] = array(
    '#type' => 'fieldset',
    '#title' => t('Gateway settings'),
    '#group' => $group,
  );
  $form[$group]['gateway']['payment_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Available payment types'),
    '#options' => $this
      ->payment_types(),
    '#default_value' => $this->payment_types,
    '#required' => TRUE,
    '#parents' => array(
      $group,
      'payment_types',
    ),
  );
  $form[$group]['gateway']['gateway_testmode'] = array(
    '#type' => 'checkbox',
    '#title' => t('Test mode'),
    '#default_value' => $this->gateway_testmode,
    '#parents' => array(
      $group,
      'gateway_testmode',
    ),
  );
}