You are here

function pay_method::settings_form in Pay 7

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

Overrides pay::settings_form

2 calls to pay_method::settings_form()
pay_method_custom::settings_form in includes/handlers/pay_method_custom.inc
pay_method_gateway::settings_form in includes/handlers/pay_method_gateway.inc
2 methods override pay_method::settings_form()
pay_method_custom::settings_form in includes/handlers/pay_method_custom.inc
pay_method_gateway::settings_form in includes/handlers/pay_method_gateway.inc

File

includes/handlers/pay_method.inc, line 118
The base class for payment activities. All payment method classes should extend this class.

Class

pay_method
@file The base class for payment activities. All payment method classes should extend this class.

Code

function settings_form(&$form, &$form_state) {
  parent::settings_form($form, $form_state);
  $group = $this
    ->handler();
  $form[$group]['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#description' => t('This is what users see when they submit payments. It is a good idea to keep it generic, such as "Credit card".'),
    '#default_value' => $this->title,
  );
  $form[$group]['description'] = array(
    '#type' => 'textfield',
    '#title' => t('Description'),
    '#description' => t('This is how the payment method will be listed in admin interfaces. Use something that will set this apart from other payment methods.'),
    '#default_value' => $this->description,
  );
  $form[$group]['min_amount'] = array(
    '#type' => 'textfield',
    '#size' => 10,
    '#title' => t('Minimum amount'),
    '#default_value' => $this->min_amount,
  );
  $form[$group]['max_amount'] = array(
    '#type' => 'textfield',
    '#size' => 10,
    '#title' => t('Maximum amount'),
    '#default_value' => $this->max_amount,
  );
  $form[$group]['pay_form_action'] = array(
    '#type' => 'radios',
    '#title' => t('When a payment form is submitted'),
    '#options' => array(
      'complete' => t('Reflect the payment immediately.'),
      'authorize' => t('Collect payment information and authorize the card (if applicable), but do not process payment. Set the transaction to "Authorized".'),
      '' => t('Do not collect payment information or process payment, leave the transaction as "Pending".'),
    ),
    '#description' => t('In some cases, (for example, when delivering a product), you may be legally required to defer payment for review or further action. If the payment method supports it, the transaction will be authorized but not processed.'),
    '#default_value' => $this->pay_form_action,
  );
  $form[$group]['permissions']['default'] = $this
    ->permissions_settings('default');
}