/**
  * Settings form
  */
 public function settingsForm()
 {
     $module_path = drupal_get_path('module', 'commerce_firstdata_gge4');
     $settings = $this->getSettings();
     $form = parent::settingsForm();
     $form['help'] = array('#type' => 'item', '#markup' => t('Once you log in to your First Data account, navigate to the Administration &rarr; Terminals area, then click on the desired terminal.') . '<br />' . t('In your First Data terminal settings, navigate to the "Details" tab.') . '<br />' . theme('commerce_firstdata_gge4_help_link', array('text' => t('View screenshot'), 'path' => $module_path . '/images/firstdata-ws-settings-terminal-details.png')));
     $form['gateway_id'] = array('#type' => 'textfield', '#title' => t('Gateway ID'), '#default_value' => $settings['gateway_id'], '#required' => TRUE, '#attributes' => array('autocomplete' => 'off'));
     $form['gateway_password'] = array('#type' => 'textfield', '#title' => t('Gateway password'), '#description' => t('You can set up your password by clicking on "Generate" or change the existing password.'), '#default_value' => $settings['gateway_password'], '#required' => TRUE, '#attributes' => array('autocomplete' => 'off'));
     $form['api_access_help'] = array('#type' => 'item', '#title' => t('Web Service: API Access'), '#markup' => t('In your First Data terminal settings, navigate to the "API Access" tab.') . '<br />' . theme('commerce_firstdata_gge4_help_link', array('text' => t('View screenshot'), 'path' => $module_path . '/images/firstdata-ws-settings-terminal-api-access.png')));
     $form['hmac_key_id'] = array('#type' => 'textfield', '#title' => t('API Access: Key ID'), '#default_value' => $settings['hmac_key_id'], '#required' => TRUE, '#attributes' => array('autocomplete' => 'off'));
     $form['hmac_key'] = array('#type' => 'textfield', '#title' => t('API Access: HMAC Key'), '#default_value' => $settings['hmac_key'], '#description' => t('Clicking "Generate New Key" will generate a new key, and an email notice will be sent to all Merchant Administrators of that account alerting them of this change. The key will be displayed in plain text when it is generated but will not be saved until the "Update" button is clicked. Note:  After this step has been taken, it will not be possible to view the key in plain text again so if this value is not stored it will be necessary to generate a new key.'), '#required' => TRUE, '#attributes' => array('autocomplete' => 'off'));
     return $form;
 }
 /**
  * Settings form
  */
 public function settingsForm()
 {
     $form = parent::settingsForm();
     return $form;
 }
 /**
  * Settings form
  */
 public function settingsForm()
 {
     $module_path = drupal_get_path('module', 'commerce_firstdata_gge4');
     $settings = $this->getSettings();
     $form = parent::settingsForm();
     $form['help'] = array('#type' => 'item', '#markup' => t('Once you log in to your First Data account, navigate to the "Payment Pages" tab in GGe4 Real-time Payment Manager.'));
     $form['page_id'] = array('#type' => 'textfield', '#title' => t('Page ID'), '#default_value' => $settings['page_id'], '#required' => TRUE, '#attributes' => array('autocomplete' => 'off'));
     $form['help_security'] = array('#type' => 'item', '#title' => t('Hosted Payment Page Security'), '#markup' => t('In your Hosted payment page settings, navigate to the "Security" page.') . '<br />' . theme('commerce_firstdata_gge4_help_link', array('text' => t('View screenshot'), 'path' => $module_path . '/images/firstdata-hpp-settings-security.png')));
     $form['hmac_encryption_type'] = array('#type' => 'select', '#title' => t('HMAC Encryption Type'), '#default_value' => $settings['hmac_encryption_type'], '#options' => array('md5' => t('MD5 (most common)'), 'sha1' => t('SHA-1')), '#description' => t('The default encryption algorithm is MD5. SHA-1 is only advised for custom requirements.'), '#required' => TRUE);
     $form['transaction_key'] = array('#type' => 'textfield', '#title' => t('Transaction Key'), '#default_value' => $settings['transaction_key'], '#required' => TRUE, '#attributes' => array('autocomplete' => 'off'));
     $form['response_key'] = array('#type' => 'textfield', '#title' => t('Response Key'), '#default_value' => $settings['response_key'], '#required' => TRUE, '#attributes' => array('autocomplete' => 'off'));
     $form['show_payment_instructions'] = array('#type' => 'checkbox', '#title' => t('Show a message on the checkout form when this payment method is selected telling the customer to "Continue with checkout to complete payment via First Data."'), '#default_value' => $settings['show_payment_instructions']);
     $form['checkout_offsite_autoredirect'] = array('#type' => 'checkbox', '#title' => t('Automatically redirect the customer to the offsite payment site on the payment step of checkout.'), '#description' => t('If card on file is enabled then the automatic redirect will be disabled if the customer is presented the option to opt-in or opt-out of card storage.'), '#default_value' => $settings['checkout_offsite_autoredirect']);
     $relay_url = str_replace(array('http://', 'https://'), '', $this->getRelayURL());
     $configs = array(array('data' => t('Receipt Page &rarr; Authorize.Net Protocol - Relay Response Settings') . ' (' . theme('commerce_firstdata_gge4_help_link', array('text' => t('View screenshot'), 'path' => $module_path . '/images/firstdata-hpp-settings-relay-response-enabled.png')) . ')', 'children' => array(t('Allow Relay Response') . ': <span class="commerce-firstdata-gge4-config-value">' . t('Enabled') . '</span>', t('Relay Response URL') . ': ' . t('Enter the url below that matches the protocol that is used during checkout.') . '<ul>' . '<li>' . t('If http: ') . '<span class="commerce-firstdata-gge4-config-value">' . "http://{$relay_url}" . '</span></li>' . '<li>' . t('If https: ') . '<span class="commerce-firstdata-gge4-config-value">' . "https://{$relay_url}" . '</span></li>' . '</ul>')));
     $form['config_help'] = array('#type' => 'item', '#title' => t('Configuration needed for your Payment Page Settings in GGe4 Real-time Payment Manager :'), '#prefix' => '<div class="commerce-firstdata-gge4-config-help">', '#markup' => theme('item_list', array('items' => $configs)), '#suffix' => '</div>');
     return $form;
 }