in thinking about this further, even after you get the installer to work, the encapsulation in v158 will, in all likelihood, not work.
to get this to work in v158a, you will need to de-encapsulate all of the various scripts.
as far as the code for installing goes, you can use this as a model to replace the aforementioned script. ensure that all of the config values are included from the released version as they may not all be included here:
global $db;
if (!defined('MODULE_PAYMENT_HELCIM_STATUS')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Helcim Payments', 'MODULE_PAYMENT_HELCIM_STATUS', 'True', 'Do you want to accept Helcim payments?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
}
if (!defined('MODULE_PAYMENT_HELCIM_API_TOKEN')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function) VALUES ('Application ID', 'MODULE_PAYMENT_HELCIM_API_TOKEN', '', 'Enter the API Token from your Dashboard. (All Tools; Integrations; API Access)', '6', '0', now(), 'zen_cfg_password_display')");
}
if (!defined('MODULE_PAYMENT_HELCIM_TRANSACTION_TYPE')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Transaction Type', 'MODULE_PAYMENT_HELCIM_TRANSACTION_TYPE', 'purchase', 'Should payments be [authorized] only, or be completed [purchases]?<br>NOTE: If you use [authorize] then you must manually capture each payment within 6 days or it will be voided automatically.', '6', '0', 'zen_cfg_select_option(array(\'authorize\', \'purchase\'), ', now())");
}
if (!defined('MODULE_PAYMENT_HELCIM_SORT_ORDER')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<hr>Sort order of display.', 'MODULE_PAYMENT_HELCIM_SORT_ORDER', '0', 'Sort order of displaying payment options to the customer. Lowest is displayed first.', '6', '0', now())");
}
if (!defined('MODULE_PAYMENT_HELCIM_ZONE')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Payment Zone', 'MODULE_PAYMENT_HELCIM_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
}
if (!defined('MODULE_PAYMENT_HELCIM_ORDER_STATUS_ID')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('Set Order Status', 'MODULE_PAYMENT_HELCIM_ORDER_STATUS_ID', '2', 'Set the status of Paid orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
}
if (!defined('MODULE_PAYMENT_HELCIM_REFUNDED_ORDER_STATUS_ID')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('Set Refunded Order Status', 'MODULE_PAYMENT_HELCIM_REFUNDED_ORDER_STATUS_ID', '1', 'Set the status of refunded orders to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
}
if (!defined('MODULE_PAYMENT_HELCIM_LOGGING')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Log Mode', 'MODULE_PAYMENT_HELCIM_LOGGING', 'Log on Failures', 'Would you like to enable debug mode? All transactions will be stored in the database, and/or emailed to store owner.', '6', '0', 'zen_cfg_select_option(array(\'Log Always\', \'Log on Failures\', \'Log Always and Email on Failures\', \'Log on Failures and Email on Failures\'), ', now())");
}
if (!defined('MODULE_PAYMENT_HELCIM_P_TOKEN')) {
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('p Token', 'MODULE_PAYMENT_HELCIM_P_TOKEN', 'd574f1aca93a65', 'P Token; DO NOT CHANGE!', '6', '155', now())");
define('MODULE_PAYMENT_HELCIM_P_TOKEN', 'd574f1aca93a65');
}
best.