[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4752: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4754: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
 OpenForum.dk • Vis emne - Installering af nyt betalingsmodul?

Installering af nyt betalingsmodul?

Danske moduler, eller oversættelser til engelske moduler.

Redaktør: Redaktionen

Installering af nyt betalingsmodul?

Indlægaf dannny » 2010-07-3 09:47

Vi skal have nyt betalingsmodul, "Moneybookers", i CDklassisk.dk. Vores ekspert har forladt os og nu prøver vi selv. Jeg har uploadet modulet i payment kataloget, men parseren melder fejl i linje 25. Hvordan kobler jeg modul og database sammen? Er der nogle variable i skriptet, der skal have en kode for at kunne snakke sammen med databasen? Jeg kender godt koderne men ved ikke hvor jeg skal sætte dem ind? Skriptet er herunder!
Mvh,
Dannny

<?php
/**
* Mediaflex Sp. z O.O.
* @author krystian.kuczek@mediaflex.pl
* @package Moneybookers Payment Plugin
*/


include_once(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'payment' . DIRECTORY_SEPARATOR . 'mb.php');

include_once(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment' . DIRECTORY_SEPARATOR . 'moneybookers' . DIRECTORY_SEPARATOR . 'moneybookers_functions.php');
include_once(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment' . DIRECTORY_SEPARATOR . 'moneybookers' . DIRECTORY_SEPARATOR . 'moneybookers_main.php');

class mb extends moneybookers_main {

function mb() {
global $messageStack;

$this->code = __CLASS__;
$this->codeVersion = '0.0.1.a';
$this->description = MODULE_PAYMENT_MONEYBOOKERS_TEXT_WELCOME;
$this->_prefix = 'MODULE_PAYMENT_MONEYBOOKERS_';
$this->title = ($this->check() ? "<b>" : "") . MODULE_PAYMENT_MONEYBOOKERS_TEXT_MAIN_MODULE . (!$this->check() ? " - <b>" . MONDULE_PAYMENT_MONEYBOOKERS_TEXT_REQUIRED : "") . "</b>";

try {
if ((int)$this->_get('ORDER_STATUS_ID') > 0) {
$this->order_status = $this->_get('ORDER_STATUS_ID');
}

$this->sort_order = $this->_get('SORT_ORDER');

if (!$this->checkConfigured()) {
$this->title .= '<b style="color: red"> (Module is not configured)</b>';
}
} catch (Exception $e) {
$this->enabled = false;
$excp = true;
}

$this->moneybookers_main();

if (!isset($excp) || $excp != true) {
$this->enabled = true;
}
}

function keys() {
$keys_list = array(
$this->_prefix . 'STATUS',
$this->_prefix . 'SORT_ORDER',
$this->_prefix . 'CURRENCY',
$this->_prefix . 'ORDER_STATUS_ID',
$this->_prefix . 'PROCESSING_ORDER_STATUS_ID',
$this->_prefix . 'EMAIL',
$this->_prefix . 'ID',
$this->_prefix . 'SECRET_WORD',
$this->_prefix . 'INFO_MAIL'
);

return $keys_list;
}

/**
* Instalacja modułu moneybookers.
*
*/
function install() {
global $db;

//Czyścimy
tep_db_query("DELETE from " . TABLE_CONFIGURATION . " where configuration_key LIKE '" . $this->_prefix . "%'");

tep_db_query(" ALTER TABLE `configuration` CHANGE `configuration_value` `configuration_value` TEXT CHARACTER SET latin2 COLLATE latin2_general_ci NOT NULL");

//Na razie nic nie wstawiamy.
$s = 0;
// $this->_toConf($key, $value, $title, $description, $sortOrder, $setFunction, $useFunction)
$this->_toConf('STATUS', 'True', MODULE_PAYMENT_MONEYBOOKERS_TEXT_ENABLED, MODULE_PAYMENT_MONEYBOOKERS_TEXT_ENABLED_DESC, $s++, 'tep_cfg_select_option(array(\'True\', \'False\'), ');
$this->_toConf('SORT_ORDER', 0, MODULE_PAYMENT_MONEYBOOKERS_TEXT_ORDEROFDISPLAY, MODULE_PAYMENT_MONEYBOOKERS_TEXT_ORDEROFDISPLAY_DESC, $s++);
$this->_toConf('CURRENCY', 'USER', MODULE_PAYMENT_MONEYBOOKERS_TEXT_CURRENCY, MODULE_PAYMENT_MONEYBOOKERS_TEXT_CURRENCY_DESC, $s++, 'mb_cfg_currency(');
$this->_toConf('PROCESSING_ORDER_STATUS_ID', DEFAULT_ORDERS_STATUS_ID, MODULE_PAYMENT_MONEYBOOKERS_TEXT_STATUS_ORDER, MODULE_PAYMENT_MONEYBOOKERS_TEXT_STATUS_ORDER_DESC, $s++, "mb_cfg_pull_down_order_statuses(", "tep_get_order_status_name");
$this->_toConf('ORDER_STATUS_ID', 2, MODULE_PAYMENT_MONEYBOOKERS_TEXT_STATUS_PENDING, MODULE_PAYMENT_MONEYBOOKERS_TEXT_STATUS_PENDING_DESC, $s++, "tep_cfg_pull_down_order_statuses(", "tep_get_order_status_name");
$this->_toConf('EMAIL', STORE_OWNER_EMAIL_ADDRESS, MODULE_PAYMENT_MONEYBOOKERS_TEXT_EMAIL, MODULE_PAYMENT_MONEYBOOKERS_TEXT_EMAIL_DESC, $s++, 'mb_cfg_email(');
$this->_toConf('SECRET_WORD', '', MODULE_PAYMENT_MONEYBOOKERS_TEXT_SECRET_WORD, MODULE_PAYMENT_MONEYBOOKERS_TEXT_SECRET_WORD_DESC, $s++, 'mb_cfg_scr_word(');
$this->_toConf('ID', '', MODULE_PAYMENT_MONEYBOOKERS_TEXT_MONEYBOOKERS_ID, MODULE_PAYMENT_MONEYBOOKERS_TEXT_MONEYBOOKERS_ID_DESC, $s++, 'mb_cfg_ident(');
$this->_toConf('INFO_MAIL', STORE_OWNER_EMAIL_ADDRESS, MODULE_PAYMENT_MONEYBOOKERS_TEXT_EMAIL_TO_MSG, MODULE_PAYMENT_MONEYBOOKERS_TEXT_EMAIL_TO_MSG_DESC, $s++, 'mb_cfg_info_email(');


$this->_addZone("Germany", 10000, 81);
$this->_addZone("SoforZone", 10001, array(81, 14, 73, 222, 204));
$this->_addZone('France', 10002, 73);
$this->_addZone('Italy', 10003, 105);
$this->_addZone('Poland', 10004, 170);
$this->_addZone('Denmark', 10005, 57);
$this->_addZone('Singapore', 10006, 188);
$this->_addZone('Austria', 10007, 14);
$this->_addZone('Bulgaria', 10008, 33);
$this->_addZone('Netherlands', 10009, 150);
$this->_addZone('Ireland', 10010, 103);
$this->_addZone('Finland', 10011, 72);
$this->_addZone('Australia', 10012, 13);
$this->_addZone('Sweden', 10013, 203);
$this->_addZone('MaestroZone', 10014, array(14, 195, 222));

}

function selection() {
return false;
}

function javascript_validation() {
return false;
}

function _addZone($country, $id, $countries) {
tep_db_query("REPLACE INTO `" . TABLE_GEO_ZONES . "` (geo_zone_id, geo_zone_name, geo_zone_description, date_added) VALUES($id, '$country', 'Created By Moneybookers Plugin', NOW());");

if (!is_array($countries)) {
$countries = array($countries);
}

foreach ($countries as $c) {
tep_db_query("INSERT INTO `" . TABLE_ZONES_TO_GEO_ZONES . "` (zone_country_id, zone_id, geo_zone_id, date_added) VALUES($c, 0, $id, NOW());");
}

}
}

?>
dannny
Novice
Novice
 
Indlæg: 25
Tilmeldt: 2004-05-10 19:23

Re: Installering af nyt betalingsmodul?

Indlægaf pertho » 2010-07-3 15:50

Hvilken shop og version drejer det sig om?
pertho
VIP medlem
VIP medlem
 
Indlæg: 2136
Tilmeldt: 2007-08-16 22:25

Re: Installering af nyt betalingsmodul?

Indlægaf dannny » 2010-07-3 17:41

Hej Pethro,
Shoppen er CDklassisk.dk, og jeg tror vi bruger oscommerce version 1 eller 2 fra år 2003.
Mvh,
Dannny
dannny
Novice
Novice
 
Indlæg: 25
Tilmeldt: 2004-05-10 19:23

Re: Installering af nyt betalingsmodul?

Indlægaf pertho » 2010-07-3 20:22

pertho
VIP medlem
VIP medlem
 
Indlæg: 2136
Tilmeldt: 2007-08-16 22:25

Re: Installering af nyt betalingsmodul?

Indlægaf dannny » 2010-07-4 08:46

Hej Pertho,
Vi er ikke meget for at lægge ca. 4000 varer ind igen i en ny database, da det er et meget stort arbejde. Vi har også ca. 7000 kunder i databasen. Kan man slet ikke fixe Moneybookers fil, så den kan arbejde med den gamle version af osc?
Mvh,
Dannny
dannny
Novice
Novice
 
Indlæg: 25
Tilmeldt: 2004-05-10 19:23


Tilbage til Moduler

Hvem er online

Brugere der læser dette forum: Ingen tilmeldte og 1 gæst

cron