PDF rausgenommen
This commit is contained in:
185
msd2/myoos/includes/modules/payment/cash.php
Normal file
185
msd2/myoos/includes/modules/payment/cash.php
Normal file
@ -0,0 +1,185 @@
|
||||
<?php
|
||||
/* ----------------------------------------------------------------------
|
||||
$Id: cash.php,v 1.1 2007/06/07 17:30:51 r23 Exp $
|
||||
|
||||
MyOOS [Shopsystem]
|
||||
https://www.oos-shop.de
|
||||
|
||||
Copyright (c) 2003 - 2019 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
File: cash.php,v 1.01 2003/02/19 01:59:00 harley_vb
|
||||
----------------------------------------------------------------------
|
||||
osCommerce, Open Source E-Commerce Solutions
|
||||
http://www.oscommerce.com
|
||||
|
||||
Copyright (c) 2002 - 2003 osCommerce
|
||||
----------------------------------------------------------------------
|
||||
Copyright (C) 2001 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers
|
||||
http://www.themedia.at & http://www.oscommerce.at
|
||||
|
||||
All rights reserved.
|
||||
|
||||
This program is free software licensed under the GNU General Public License (GPL).
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
class cash {
|
||||
var $code, $title, $description, $enabled;
|
||||
|
||||
// class constructor
|
||||
public function __construct() {
|
||||
global $oOrder, $aLang;
|
||||
|
||||
$this->code = 'cash';
|
||||
$this->title = $aLang['module_payment_cash_text_title'];
|
||||
$this->description = $aLang['module_payment_cash_text_description'];
|
||||
$this->enabled = (defined('MODULE_PAYMENT_CASH_STATUS') && (MODULE_PAYMENT_CASH_STATUS == 'True') ? TRUE : FALSE);
|
||||
|
||||
$this->sort_order = (defined('MODULE_PAYMENT_CASH_SORT_ORDER') ? MODULE_PAYMENT_CASH_SORT_ORDER : NULL);
|
||||
|
||||
if ((defined('MODULE_PAYMENT_CASH_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_CASH_ORDER_STATUS_ID > 0)) {
|
||||
$this->order_status = MODULE_PAYMENT_CASH_ORDER_STATUS_ID;
|
||||
}
|
||||
|
||||
if ( $this->enabled === TRUE ) {
|
||||
if ( isset($oOrder) && is_object($oOrder) ) {
|
||||
$this->update_status();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// class methods
|
||||
function update_status() {
|
||||
global $oOrder;
|
||||
|
||||
|
||||
if ($_SESSION['shipping']['id'] != 'selfpickup_selfpickup') {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if ( ($this->enabled == TRUE) && ((int)MODULE_PAYMENT_CASH_ZONE > 0) ) {
|
||||
$check_flag = FALSE;
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$zones_to_geo_zonestable = $oostable['zones_to_geo_zones'];
|
||||
$check_result = $dbconn->Execute("SELECT zone_id FROM $zones_to_geo_zonestable WHERE geo_zone_id = '" . MODULE_PAYMENT_CASH_ZONE . "' AND zone_country_id = '" . $oOrder->delivery['country']['id'] . "' ORDER BY zone_id");
|
||||
|
||||
while ($check = $check_result->fields) {
|
||||
if ($check['zone_id'] < 1) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
} elseif ($check['zone_id'] == $oOrder->delivery['zone_id']) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Move that ADOdb pointer!
|
||||
$check_result->MoveNext();
|
||||
}
|
||||
|
||||
if ($check_flag == FALSE) {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// disable the module if the order only contains virtual products
|
||||
if ($this->enabled == TRUE) {
|
||||
if ($oOrder->content_type == 'virtual') {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// class methods
|
||||
function javascript_validation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function selection() {
|
||||
return array('id' => $this->code,
|
||||
'module' => $this->title);
|
||||
}
|
||||
|
||||
function pre_confirmation_check(){
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function confirmation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function process_button() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function before_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function after_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function get_error() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function check() {
|
||||
if (!isset($this->_check)) {
|
||||
$this->_check = defined('MODULE_PAYMENT_CASH_STATUS');
|
||||
}
|
||||
|
||||
return $this->_check;
|
||||
}
|
||||
|
||||
function install() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_PAYMENT_CASH_STATUS', 'True', '6', '0', 'oos_cfg_select_option(array(\'True\', \'False\'), ', now());");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('MODULE_PAYMENT_CASH_ZONE', '0', '6', '0', 'oos_cfg_get_zone_class_title', 'oos_cfg_pull_down_zone_classes(', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_CASH_SORT_ORDER', '0', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('MODULE_PAYMENT_CASH_ORDER_STATUS_ID', '0', '6', '0', 'oos_cfg_pull_down_order_statuses(', 'oos_cfg_get_order_status_name', now())");
|
||||
}
|
||||
|
||||
function remove() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("DELETE FROM $configurationtable WHERE configuration_key in ('" . implode("', '", $this->keys()) . "')");
|
||||
}
|
||||
|
||||
function keys() {
|
||||
return array('MODULE_PAYMENT_CASH_STATUS', 'MODULE_PAYMENT_CASH_ZONE', 'MODULE_PAYMENT_CASH_ORDER_STATUS_ID', 'MODULE_PAYMENT_CASH_SORT_ORDER');
|
||||
}
|
||||
}
|
||||
|
159
msd2/myoos/includes/modules/payment/cod.php
Normal file
159
msd2/myoos/includes/modules/payment/cod.php
Normal file
@ -0,0 +1,159 @@
|
||||
<?php
|
||||
/* ----------------------------------------------------------------------
|
||||
$Id: cod.php,v 1.1 2007/06/07 17:30:51 r23 Exp $
|
||||
|
||||
MyOOS [Shopsystem]
|
||||
https://www.oos-shop.de
|
||||
|
||||
Copyright (c) 2003 - 2019 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
File: cod.php,v 1.28 2003/02/14 05:51:31 hpdl
|
||||
----------------------------------------------------------------------
|
||||
osCommerce, Open Source E-Commerce Solutions
|
||||
http://www.oscommerce.com
|
||||
|
||||
Copyright (c) 2003 osCommerce
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
class cod {
|
||||
var $code, $title, $description, $enabled;
|
||||
|
||||
// class constructor
|
||||
public function __construct() {
|
||||
global $oOrder, $aLang;
|
||||
|
||||
$this->code = 'cod';
|
||||
$this->title = $aLang['module_payment_cod_text_title'];
|
||||
$this->description = $aLang['module_payment_cod_text_description'];
|
||||
$this->enabled = (defined('MODULE_PAYMENT_COD_STATUS') && (MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
|
||||
|
||||
$this->sort_order = (defined('MODULE_PAYMENT_COD_SORT_ORDER') ? MODULE_PAYMENT_COD_SORT_ORDER : null);
|
||||
|
||||
$this->order_status = defined('MODULE_PAYMENT_COD_ORDER_STATUS_ID') && ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) ? (int)MODULE_PAYMENT_COD_ORDER_STATUS_ID : 0;
|
||||
|
||||
if ( $this->enabled === true ) {
|
||||
if ( isset($oOrder) && is_object($oOrder) ) {
|
||||
$this->update_status();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// class methods
|
||||
function update_status() {
|
||||
global $oOrder;
|
||||
|
||||
|
||||
if ($_SESSION['shipping']['id'] == 'selfpickup_selfpickup') {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
|
||||
if ( ($this->enabled == TRUE) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
|
||||
$check_flag = FALSE;
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$zones_to_geo_zonestable = $oostable['zones_to_geo_zones'];
|
||||
$check_result = $dbconn->Execute("SELECT zone_id FROM $zones_to_geo_zonestable WHERE geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' AND zone_country_id = '" . $oOrder->delivery['country']['id'] . "' ORDER BY zone_id");
|
||||
while ($check = $check_result->fields) {
|
||||
if ($check['zone_id'] < 1) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
} elseif ($check['zone_id'] == $oOrder->delivery['zone_id']) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Move that ADOdb pointer!
|
||||
$check_result->MoveNext();
|
||||
}
|
||||
|
||||
|
||||
if ($check_flag == FALSE) {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->enabled == TRUE) {
|
||||
// disable the module if the order only contains virtual products
|
||||
if ($oOrder->content_type == 'virtual') {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function javascript_validation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function selection() {
|
||||
return array('id' => $this->code,
|
||||
'module' => $this->title);
|
||||
}
|
||||
|
||||
function pre_confirmation_check() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function confirmation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function process_button() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function before_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function after_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function get_error() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
function check() {
|
||||
if (!isset($this->_check)) {
|
||||
$this->_check = defined('MODULE_PAYMENT_COD_STATUS');
|
||||
}
|
||||
|
||||
return $this->_check;
|
||||
}
|
||||
|
||||
function install() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_PAYMENT_COD_STATUS', 'True', '6', '1', 'oos_cfg_select_option(array(\'True\', \'False\'), ', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('MODULE_PAYMENT_COD_ZONE', '0', '6', '2', 'oos_cfg_get_zone_class_title', 'oos_cfg_pull_down_zone_classes(', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_COD_SORT_ORDER', '0', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', '6', '0', 'oos_cfg_pull_down_order_statuses(', 'oos_cfg_get_order_status_name', now())");
|
||||
}
|
||||
|
||||
function remove() {
|
||||
|
||||
// Get database information
|
||||
$oostable =& oosDBGetTables();
|
||||
$dbconn =& oosDBGetConn();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("DELETE FROM $configurationtable WHERE configuration_key in ('" . implode("', '", $this->keys()) . "')");
|
||||
}
|
||||
|
||||
function keys() {
|
||||
return array('MODULE_PAYMENT_COD_STATUS', 'MODULE_PAYMENT_COD_ZONE', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', 'MODULE_PAYMENT_COD_SORT_ORDER');
|
||||
}
|
||||
}
|
||||
|
168
msd2/myoos/includes/modules/payment/eubanktransfer.php
Normal file
168
msd2/myoos/includes/modules/payment/eubanktransfer.php
Normal file
@ -0,0 +1,168 @@
|
||||
<?php
|
||||
/* ----------------------------------------------------------------------
|
||||
$Id: eubanktransfer.php,v 1.1 2007/06/07 17:30:51 r23 Exp $
|
||||
|
||||
MyOOS [Shopsystem]
|
||||
https://www.oos-shop.de
|
||||
|
||||
Copyright (c) 2003 - 2019 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
File: eubanktransfer.php,v 1.8 2006/04/22 12:00:00 by Onkel Flo
|
||||
Thanks to all the developers from the EU-Standard Bank Transfer module
|
||||
----------------------------------------------------------------------
|
||||
osCommerce, Open Source E-Commerce Solutions
|
||||
http://www.oscommerce.com
|
||||
|
||||
Copyright (c) 2002 - 2003 osCommerce
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
class eubanktransfer {
|
||||
var $code, $title, $description, $enabled;
|
||||
|
||||
// class constructor
|
||||
public function __construct() {
|
||||
global $oOrder, $aLang;
|
||||
|
||||
$this->code = 'eubanktransfer';
|
||||
$this->title = $aLang['module_payment_eu_banktransfer_text_title'];
|
||||
$this->description = $aLang['module_payment_eu_banktransfer_text_description'];
|
||||
$this->enabled = (defined('MODULE_PAYMENT_EU_BANKTRANSFER_STATUS') && (MODULE_PAYMENT_EU_BANKTRANSFER_STATUS == 'True') ? TRUE : FALSE);
|
||||
$this->sort_order = (defined('MODULE_PAYMENT_EU_BANKTRANSFER_SORT_ORDER') ? MODULE_PAYMENT_EU_BANKTRANSFER_SORT_ORDER : NULL);
|
||||
|
||||
if ((defined('MODULE_PAYMENT_EU_BANKTRANSFER_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_EU_BANKTRANSFER_ORDER_STATUS_ID > 0)) {
|
||||
$this->order_status = MODULE_PAYMENT_EU_BANKTRANSFER_ORDER_STATUS_ID;
|
||||
}
|
||||
|
||||
if ( $this->enabled === true ) {
|
||||
if ( isset($oOrder) && is_object($oOrder) ) {
|
||||
$this->update_status();
|
||||
}
|
||||
}
|
||||
|
||||
$this->email_footer = $aLang['module_payment_eu_banktransfer_email_footer'];
|
||||
}
|
||||
|
||||
// class methodsi
|
||||
function update_status() {
|
||||
global $oOrder, $aLang;
|
||||
|
||||
if ($_SESSION['shipping']['id'] == 'selfpickup_selfpickup') {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
|
||||
if ( ($this->enabled == TRUE) && ((int)MODULE_PAYMENT_EU_BANKTRANSFER_ZONE > 0) ) {
|
||||
$check_flag = FALSE;
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$zones_to_geo_zonestable = $oostable['zones_to_geo_zones'];
|
||||
$check_result = $dbconn->Execute("SELECT zone_id FROM $zones_to_geo_zonestable WHERE geo_zone_id = '" . MODULE_PAYMENT_INVOICE_ZONE . "' AND zone_country_id = '" . $oOrder->delivery['country']['id'] . "' ORDER BY zone_id");
|
||||
while ($check = $check_result->fields) {
|
||||
if ($check['zone_id'] < 1) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
} elseif ($check['zone_id'] == $oOrder->delivery['zone_id']) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Move that ADOdb pointer!
|
||||
$check_result->MoveNext();
|
||||
}
|
||||
|
||||
if ($check_flag == FALSE) {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// disable the module if the order only contains virtual products
|
||||
if ($this->enabled == TRUE) {
|
||||
if ($oOrder->content_type == 'virtual') {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function javascript_validation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function selection() {
|
||||
return array('id' => $this->code,
|
||||
'module' => $this->title);
|
||||
}
|
||||
|
||||
function pre_confirmation_check(){
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function confirmation() {
|
||||
global $aLang;
|
||||
return array('title' => $aLang['module_payment_eu_banktransfer_text_description']);
|
||||
}
|
||||
|
||||
function process_button() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function before_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function after_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function get_error() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function check() {
|
||||
if (!isset($this->_check)) {
|
||||
$this->_check = defined('MODULE_PAYMENT_EU_BANKTRANSFER_STATUS');
|
||||
}
|
||||
|
||||
return $this->_check;
|
||||
}
|
||||
|
||||
function install() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_STATUS', 'True', '6', '1', 'oos_cfg_select_option(array(\'True\', \'False\'), ', now());");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_BANKNAME', '----', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_KONTONAME', '----', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_KONTONUM', '----', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_IBAN', '----', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_BIC', '----', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_ZONE', '0', '6', '2', 'oos_cfg_get_zone_class_title', 'oos_cfg_pull_down_zone_classes(', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_ORDER_STATUS_ID', '0', '6', '0', 'oos_cfg_pull_down_order_statuses(', 'oos_cfg_get_order_status_name', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_EU_BANKTRANSFER_SORT_ORDER', '0', '6', '0', now())");
|
||||
|
||||
}
|
||||
|
||||
function remove() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("DELETE FROM $configurationtable WHERE configuration_key in ('" . implode("', '", $this->keys()) . "')");
|
||||
}
|
||||
|
||||
function keys() {
|
||||
return array('MODULE_PAYMENT_EU_BANKTRANSFER_STATUS', 'MODULE_PAYMENT_EU_BANKTRANSFER_ORDER_STATUS_ID', 'MODULE_PAYMENT_EU_BANKTRANSFER_SORT_ORDER', 'MODULE_PAYMENT_EU_BANKTRANSFER_BANKNAME', 'MODULE_PAYMENT_EU_BANKTRANSFER_KONTONAME', 'MODULE_PAYMENT_EU_BANKTRANSFER_KONTONUM', 'MODULE_PAYMENT_EU_BANKTRANSFER_IBAN', 'MODULE_PAYMENT_EU_BANKTRANSFER_BIC');
|
||||
}
|
||||
}
|
||||
|
155
msd2/myoos/includes/modules/payment/invoice.php
Normal file
155
msd2/myoos/includes/modules/payment/invoice.php
Normal file
@ -0,0 +1,155 @@
|
||||
<?php
|
||||
/* ----------------------------------------------------------------------
|
||||
$Id: invoice.php,v 1.1 2007/06/07 17:30:51 r23 Exp $
|
||||
|
||||
MyOOS [Shopsystem]
|
||||
https://www.oos-shop.de
|
||||
|
||||
Copyright (c) 2003 - 2019 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
File: invoice.php,v 1.25 2003/02/19 02:14:00 harley_vb
|
||||
----------------------------------------------------------------------
|
||||
osCommerce, Open Source E-Commerce Solutions
|
||||
http://www.oscommerce.com
|
||||
|
||||
Copyright (c) 2002 - 2003 osCommerce
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
class invoice {
|
||||
var $code, $title, $description, $enabled = FALSE;
|
||||
|
||||
// class constructor
|
||||
public function __construct() {
|
||||
global $aLang, $oOrder;
|
||||
|
||||
$this->code = 'invoice';
|
||||
$this->title = $aLang['module_payment_invoice_text_title'];
|
||||
$this->description = $aLang['module_payment_invoice_text_description'];
|
||||
$this->enabled = (defined('MODULE_PAYMENT_INVOICE_STATUS') && (MODULE_PAYMENT_INVOICE_STATUS == 'True') ? TRUE : FALSE);
|
||||
$this->sort_order = (defined('MODULE_PAYMENT_INVOICE_SORT_ORDER') ? MODULE_PAYMENT_INVOICE_SORT_ORDER : NULL);
|
||||
|
||||
if ((defined('MODULE_PAYMENT_INVOICE_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_INVOICE_ORDER_STATUS_ID > 0)) {
|
||||
$this->order_status = MODULE_PAYMENT_INVOICE_ORDER_STATUS_ID;
|
||||
}
|
||||
|
||||
if ( $this->enabled === TRUE ) {
|
||||
if ( isset($oOrder) && is_object($oOrder) ) {
|
||||
$this->update_status();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// class methods
|
||||
function update_status() {
|
||||
global $oOrder, $aLang;
|
||||
|
||||
|
||||
if ( ($this->enabled == TRUE) && ((int)MODULE_PAYMENT_INVOICE_ZONE > 0) ) {
|
||||
$check_flag = FALSE;
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$zones_to_geo_zonestable = $oostable['zones_to_geo_zones'];
|
||||
$check_result = $dbconn->Execute("SELECT zone_id FROM $zones_to_geo_zonestable WHERE geo_zone_id = '" . MODULE_PAYMENT_INVOICE_ZONE . "' AND zone_country_id = '" . $oOrder->delivery['country']['id'] . "' ORDER BY zone_id");
|
||||
while ($check = $check_result->fields) {
|
||||
if ($check['zone_id'] < 1) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
} elseif ($check['zone_id'] == $oOrder->delivery['zone_id']) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Move that ADOdb pointer!
|
||||
$check_result->MoveNext();
|
||||
}
|
||||
|
||||
if ($check_flag == FALSE) {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// disable the module if the order only contains virtual products
|
||||
if ($this->enabled == TRUE) {
|
||||
if ($oOrder->content_type == 'virtual') {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// class methods
|
||||
function javascript_validation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function selection() {
|
||||
return array('id' => $this->code,
|
||||
'module' => $this->title);
|
||||
}
|
||||
|
||||
function pre_confirmation_check(){
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function confirmation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function process_button() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function before_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function after_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function get_error() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function check() {
|
||||
if (!isset($this->_check)) {
|
||||
$this->_check = defined('MODULE_PAYMENT_INVOICE_STATUS');
|
||||
}
|
||||
|
||||
return $this->_check;
|
||||
}
|
||||
|
||||
function install() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_PAYMENT_INVOICE_STATUS', 'True', '6', '0', 'oos_cfg_select_option(array(\'True\', \'False\'), ', now());");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('MODULE_PAYMENT_INVOICE_ZONE', '0', '6', '0', 'oos_cfg_get_zone_class_title', 'oos_cfg_pull_down_zone_classes(', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_INVOICE_SORT_ORDER', '0', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('MODULE_PAYMENT_INVOICE_ORDER_STATUS_ID', '0', '6', '0', 'oos_cfg_pull_down_order_statuses(', 'oos_cfg_get_order_status_name', now())");
|
||||
}
|
||||
|
||||
function remove() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("DELETE FROM $configurationtable WHERE configuration_key in ('" . implode("', '", $this->keys()) . "')");
|
||||
}
|
||||
|
||||
function keys() {
|
||||
return array('MODULE_PAYMENT_INVOICE_STATUS', 'MODULE_PAYMENT_INVOICE_ZONE', 'MODULE_PAYMENT_INVOICE_ORDER_STATUS_ID', 'MODULE_PAYMENT_INVOICE_SORT_ORDER');
|
||||
}
|
||||
}
|
||||
|
153
msd2/myoos/includes/modules/payment/moneyorder.php
Normal file
153
msd2/myoos/includes/modules/payment/moneyorder.php
Normal file
@ -0,0 +1,153 @@
|
||||
<?php
|
||||
/* ----------------------------------------------------------------------
|
||||
$Id: moneyorder.php,v 1.1 2007/06/07 17:30:51 r23 Exp $
|
||||
|
||||
MyOOS [Shopsystem]
|
||||
https://www.oos-shop.de
|
||||
|
||||
Copyright (c) 2003 - 2019 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
File: moneyorder.php,v 1.10 2003/01/29 19:57:14 hpdl
|
||||
----------------------------------------------------------------------
|
||||
osCommerce, Open Source E-Commerce Solutions
|
||||
http://www.oscommerce.com
|
||||
|
||||
Copyright (c) 2003 osCommerce
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
class moneyorder {
|
||||
var $code, $title, $description, $enabled = FALSE;
|
||||
|
||||
// class constructor
|
||||
public function __construct() {
|
||||
global $oOrder, $aLang;
|
||||
|
||||
$this->code = 'moneyorder';
|
||||
$this->title = $aLang['module_payment_moneyorder_text_title'];
|
||||
$this->description = $aLang['module_payment_moneyorder_text_description'];
|
||||
$this->enabled = (defined('MODULE_PAYMENT_MONEYORDER_STATUS') && (MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
|
||||
$this->sort_order = (defined('MODULE_PAYMENT_MONEYORDER_SORT_ORDER') ? MODULE_PAYMENT_MONEYORDER_SORT_ORDER : null);
|
||||
|
||||
if ((defined('MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0)) {
|
||||
$this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
|
||||
}
|
||||
|
||||
if ( $this->enabled === true ) {
|
||||
if ( isset($oOrder) && is_object($oOrder) ) {
|
||||
$this->update_status();
|
||||
}
|
||||
}
|
||||
|
||||
$this->email_footer = $aLang['module_payment_moneyorder_text_email_footer'];
|
||||
}
|
||||
|
||||
// class methods
|
||||
function update_status() {
|
||||
global $oOrder;
|
||||
|
||||
/*
|
||||
|
||||
if ( ($this->enabled == TRUE) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
|
||||
$check_flag = FALSE;
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$zones_to_geo_zonestable = $oostable['zones_to_geo_zones'];
|
||||
$check_result = $dbconn->Execute("SELECT zone_id FROM $zones_to_geo_zonestable WHERE geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' AND zone_country_id = '" . $oOrder->billing['country']['id'] . "' ORDER BY zone_id");
|
||||
while ($check = $check_result->fields) {
|
||||
if ($check['zone_id'] < 1) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
} elseif ($check['zone_id'] == $oOrder->billing['zone_id']) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Move that ADOdb pointer!
|
||||
$check_result->MoveNext();
|
||||
}
|
||||
|
||||
if ($check_flag == FALSE) {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function javascript_validation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function selection() {
|
||||
return array('id' => $this->code,
|
||||
'module' => $this->title);
|
||||
}
|
||||
|
||||
function pre_confirmation_check() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function confirmation() {
|
||||
global $aLang;
|
||||
return array('title' => $aLang['module_payment_moneyorder_text_description']);
|
||||
}
|
||||
|
||||
function process_button() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function before_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function after_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function get_error() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function check() {
|
||||
if (!isset($this->_check)) {
|
||||
$this->_check = defined('MODULE_PAYMENT_MONEYORDER_STATUS');
|
||||
}
|
||||
|
||||
return $this->_check;
|
||||
}
|
||||
|
||||
function install() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_PAYMENT_MONEYORDER_STATUS', 'True', '6', '1', 'oos_cfg_select_option(array(\'True\', \'False\'), ', now());");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_MONEYORDER_PAYTO', '', '6', '1', now());");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('MODULE_PAYMENT_MONEYORDER_ZONE', '0', '6', '2', 'oos_cfg_get_zone_class_title', 'oos_cfg_pull_down_zone_classes(', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', '6', '0', 'oos_cfg_pull_down_order_statuses(', 'oos_cfg_get_order_status_name', now())");
|
||||
}
|
||||
|
||||
function remove() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("DELETE FROM $configurationtable WHERE configuration_key in ('" . implode("', '", $this->keys()) . "')");
|
||||
}
|
||||
|
||||
function keys() {
|
||||
return array('MODULE_PAYMENT_MONEYORDER_STATUS', 'MODULE_PAYMENT_MONEYORDER_ZONE', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', 'MODULE_PAYMENT_MONEYORDER_PAYTO');
|
||||
}
|
||||
}
|
||||
|
178
msd2/myoos/includes/modules/payment/paypal.php
Normal file
178
msd2/myoos/includes/modules/payment/paypal.php
Normal file
@ -0,0 +1,178 @@
|
||||
<?php
|
||||
/* ----------------------------------------------------------------------
|
||||
$Id: paypal.php,v 1.1 2007/06/07 17:30:51 r23 Exp $
|
||||
|
||||
MyOOS [Shopsystem]
|
||||
https://www.oos-shop.de
|
||||
|
||||
Copyright (c) 2003 - 2019 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
File: paypal.php,v 1.39 2003/01/29 19:57:15 hpdl
|
||||
----------------------------------------------------------------------
|
||||
osCommerce, Open Source E-Commerce Solutions
|
||||
http://www.oscommerce.com
|
||||
|
||||
Copyright (c) 2003 osCommerce
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
class paypal {
|
||||
var $code, $title, $description, $enabled = FALSE;
|
||||
|
||||
// class constructor
|
||||
public function __construct() {
|
||||
global $oOrder, $aLang;
|
||||
|
||||
$this->code = 'paypal';
|
||||
$this->title = $aLang['module_payment_paypal_text_title'];
|
||||
$this->description = $aLang['module_payment_paypal_text_description'];
|
||||
$this->enabled = (defined('MODULE_PAYMENT_PAYPAL_STATUS') && (MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? TRUE : FALSE);
|
||||
$this->sort_order = (defined('MODULE_PAYMENT_PAYPAL_SORT_ORDER') ? MODULE_PAYMENT_PAYPAL_SORT_ORDER : NULL);
|
||||
|
||||
if ((defined('MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0)) {
|
||||
$this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
|
||||
}
|
||||
|
||||
if ( $this->enabled === TRUE ) {
|
||||
if ( isset($oOrder) && is_object($oOrder) ) {
|
||||
$this->update_status();
|
||||
}
|
||||
}
|
||||
|
||||
$this->form_action_url = 'https://www.paypal.com/de/cgi-bin/webscr';
|
||||
}
|
||||
|
||||
// class methods
|
||||
function update_status() {
|
||||
global $oOrder;
|
||||
|
||||
if ( ($this->enabled == TRUE) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
|
||||
$check_flag = FALSE;
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$zones_to_geo_zonestable = $oostable['zones_to_geo_zones'];
|
||||
$check_result = $dbconn->Execute("SELECT zone_id FROM $zones_to_geo_zonestable WHERE geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' AND zone_country_id = '" . $oOrder->billing['country']['id'] . "' ORDER BY zone_id");
|
||||
while ($check = $check_result->fields) {
|
||||
if ($check['zone_id'] < 1) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
} elseif ($check['zone_id'] == $oOrder->billing['zone_id']) {
|
||||
$check_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Move that ADOdb pointer!
|
||||
$check_result->MoveNext();
|
||||
}
|
||||
|
||||
if ($check_flag == FALSE) {
|
||||
$this->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function javascript_validation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function selection() {
|
||||
return array('id' => $this->code,
|
||||
'module' => $this->title);
|
||||
}
|
||||
|
||||
function pre_confirmation_check() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function confirmation() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function process_button() {
|
||||
global $oOrder, $oCurrencies;
|
||||
|
||||
$my_currency = $_SESSION['currency'];
|
||||
|
||||
if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
|
||||
$my_currency = 'EUR';
|
||||
}
|
||||
$aContents = oos_get_content();
|
||||
|
||||
$process_button_string = oos_draw_hidden_field('cmd', '_xclick') .
|
||||
oos_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .
|
||||
oos_draw_hidden_field('item_name', oos_replace_chars(STORE_NAME)) .
|
||||
oos_draw_hidden_field('amount', number_format(($oOrder->info['total'] - $oOrder->info['shipping_cost']) * $oCurrencies->get_value($my_currency), $oCurrencies->get_decimal_places($my_currency))) .
|
||||
oos_draw_hidden_field('first_name', oos_replace_chars($oOrder->billing['firstname'])) .
|
||||
oos_draw_hidden_field('last_name', oos_replace_chars($oOrder->billing['lastname'])) .
|
||||
oos_draw_hidden_field('address1', oos_replace_chars($oOrder->billing['street_address'])) .
|
||||
oos_draw_hidden_field('city', oos_replace_chars($oOrder->billing['city'])) .
|
||||
oos_draw_hidden_field('state', oos_replace_chars($oOrder->billing['state'])) .
|
||||
oos_draw_hidden_field('zip', $oOrder->billing['postcode']) .
|
||||
oos_draw_hidden_field('lc', $oOrder->billing['country']['iso_code_2']) .
|
||||
oos_draw_hidden_field('email', $oOrder->customer['email_address']) .
|
||||
oos_draw_hidden_field('shipping', number_format($oOrder->info['shipping_cost'] * $oCurrencies->get_value($my_currency), $oCurrencies->get_decimal_places($my_currency))) .
|
||||
oos_draw_hidden_field('currency_code', $my_currency) .
|
||||
oos_draw_hidden_field('rm', '2') .
|
||||
oos_draw_hidden_field('bn', 'MyOOS [Shopsystem]') .
|
||||
oos_draw_hidden_field('no_note', '1');
|
||||
$process_button_string .= '<input type="hidden" name="return" value="' . oos_href_link($aContents['checkout_process']) . '" >';
|
||||
$process_button_string .= '<input type="hidden" name="cancel_return" value="' . oos_href_link($aContents['checkout_payment']) . '" >';
|
||||
|
||||
|
||||
return $process_button_string;
|
||||
}
|
||||
|
||||
function before_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function after_process() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function output_error() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function check() {
|
||||
if (!isset($this->_check)) {
|
||||
$this->_check = defined('MODULE_PAYMENT_PAYPAL_STATUS');
|
||||
}
|
||||
|
||||
return $this->_check;
|
||||
}
|
||||
|
||||
function install() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) VALUES ('MODULE_PAYMENT_PAYPAL_STATUS', 'True', '6', '3', 'oos_cfg_select_option(array(\'True\', \'False\'), ', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_PAYPAL_ID', 'you@yourbusiness.com', '6', '4', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) VALUES ('MODULE_PAYMENT_PAYPAL_SORT_ORDER', '0', '6', '0', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('MODULE_PAYMENT_PAYPAL_ZONE', '0', '6', '2', 'oos_cfg_get_zone_class_title', 'oos_cfg_pull_down_zone_classes(', now())");
|
||||
$dbconn->Execute("INSERT INTO $configurationtable (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) VALUES ('MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', '0', '6', '0', 'oos_cfg_pull_down_order_statuses(', 'oos_cfg_get_order_status_name', now())");
|
||||
}
|
||||
|
||||
function remove() {
|
||||
|
||||
// Get database information
|
||||
$dbconn =& oosDBGetConn();
|
||||
$oostable =& oosDBGetTables();
|
||||
|
||||
$configurationtable = $oostable['configuration'];
|
||||
$dbconn->Execute("DELETE FROM $configurationtable WHERE configuration_key in ('" . implode("', '", $this->keys()) . "')");
|
||||
}
|
||||
|
||||
function keys() {
|
||||
return array('MODULE_PAYMENT_PAYPAL_STATUS', 'MODULE_PAYMENT_PAYPAL_ID', 'MODULE_PAYMENT_PAYPAL_ZONE', 'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', 'MODULE_PAYMENT_PAYPAL_SORT_ORDER');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user