Payment fee doesnt work

When I add a payment fee to my payment module it doesnt change the total or show up in summary. Doesnt work on the build in COD either.
I also would like to set like 20% discount if a certain payment method is chosen.

  class pm_swish {
    public $id = __CLASS__;
    public $name = 'Swish';
    public $description = 'Swish';
    public $author = 'brunochsmal';
    public $version = '1.0';
    public $support_link = 'http://www.litecart.net';
    public $website = 'http://www.litecart.net';
    public $priority = 0;

    public function __construct() {
    }

    public function options($items, $subtotal, $tax, $currency_code, $customer) {

      if (empty($this->settings['status'])) return;

      $country_code = !empty($customer['shipping_address']['country_code']) ? $customer['shipping_address']['country_code'] : $customer['country_code'];

      if (!empty($this->settings['geo_zone_id'])) {
        if (functions::reference_in_geo_zone($this->settings['geo_zone_id'], $country_code, $customer['zone_code']) != true) return;
      }

      $method = array(
        'title' => 'Swish',
        'description' => 'Swish',
        'options' => array(
          array(
            'id' => 'swish',
            'icon' => $this->settings['icon'],
            'name' => reference::country($country_code)->name,
            'description' => 'Swish eller banköverföring',
            'fields' => '',
            'cost' => $this->settings['fee'],
            'tax_class_id' => $this->settings['tax_class_id'],
            'confirm' => language::translate(__CLASS__.':title_confirm_order', 'Confirm Order'),
          ),
        )
      );
      return $method;
    }

    public function pre_check() {
    }

    public function transfer() {
      return array(
        'action' => '',
        'method' => '',
        'fields' => '',
      );
    }

    public function verify() {
      return array(
        'order_status_id' => $this->settings['order_status_id'],
        'payment_transaction_id' => '',
        'errors' => '',
      );
    }

    public function after_process() {
    }

    function settings() {
      return array(
        array(
          'key' => 'status',
          'default_value' => '1',
          'title' => language::translate(__CLASS__.':title_status', 'Status'),
          'description' => language::translate(__CLASS__.':description_status', 'Enables or disables the module.'),
          'function' => 'toggle("e/d")',
        ),
        array(
          'key' => 'icon',
          'default_value' => '',
          'title' => language::translate(__CLASS__.':title_icon', 'Icon'),
          'description' => language::translate(__CLASS__.':description_icon', 'Web path of the icon to be displayed.'),
          'function' => 'input()',
        ),
        array(
          'key' => 'fee',
          'default_value' => '0',
          'title' => language::translate(__CLASS__.':title_payment_fee', 'Payment Fee'),
          'description' => language::translate(__CLASS__.':description_payment_fee', 'Adds a payment fee to the order.'),
          'function' => 'decimal()',
        ),
        array(
          'key' => 'tax_class_id',
          'default_value' => '',
          'title' => language::translate(__CLASS__.':title_tax_class', 'Tax Class'),
          'description' => language::translate(__CLASS__.':description_tax_class', 'The tax class for the fee.'),
          'function' => 'tax_classes()',
        ),
        array(
          'key' => 'order_status_id',
          'default_value' => '0',
          'title' => language::translate('title_order_status', 'Order Status'),
          'description' => language::translate('modules:description_order_status', 'Give orders made with this payment method the following order status.'),
          'function' => 'order_status()',
        ),
        array(
          'key' => 'geo_zone_id',
          'default_value' => '',
          'title' => language::translate('title_geo_zone_limitation', 'Geo Zone Limitation'),
          'description' => language::translate('modules:description_geo_zone', 'Limit this module to the selected geo zone. Otherwise leave blank.'),
          'function' => 'geo_zones()',
        ),
        array(
          'key' => 'priority',
          'default_value' => '0',
          'title' => language::translate('title_priority', 'Priority'),
          'description' => language::translate('modules:description_priority', 'Process this module in the given priority order.'),
          'function' => 'int()',
        ),
      );
    }

    public function install() {}

    public function uninstall() {}
  }
tim
Is your order total module ot_payment_fee installed? That's the module that adds the fee.
You can't really set a 20% discount to the order total due to the process chain problem. The total doesn't exist when you display options. (The hen before the egg issue) The subtotal however exists.
No it wasnt :)
Now it works, but not with %. Possible to make it work with % also ?

Also there are a + sign before the fee I dont want when its a discount. Where can I remove that ?
tim
Not possible without writing a piece of code. The plus sign would be in includes/templates/*.catalog/views/box_checkout_payment.inc.php