logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

[TEP-COMMIT] CVS: catalog/catalog/includes/modules/payment authorizenet.php: msg#00034

Subject: [TEP-COMMIT] CVS: catalog/catalog/includes/modules/payment authorizenet.php,1.42,1.43 cc.php,1.48,1.49 cod.php,1.23,1.24 ipayment.php,1.28,1.29 moneyorder.php,1.5,1.6 nochex.php,1.8,1.9 paypal.php,1.35,1.36 pm2checkout.php,1.15,1.16 psigate.php,1.12,1.13 secpay.php,1.27,1.28
Update of /cvsroot/tep/catalog/catalog/includes/modules/payment
In directory sc8-pr-cvs1:/tmp/cvs-serv32601/catalog/includes/modules/payment

Modified Files:
        authorizenet.php cc.php cod.php ipayment.php moneyorder.php 
        nochex.php paypal.php pm2checkout.php psigate.php secpay.php 
Log Message:
Updates to the checkout procedure logic (specifically the payment and
shipping modules)

Payment Modules:

* Added zones; payment modules can now be enabled and disabled realtime
depending on the zone setting and billing (or shipping for the COD module)
destination

* Added order status setting; new orders made with the module will use the
selected order status instead of the global default status

Shipping Modules:

* Added zones; shipping modules can now be enabled and disabled realtime
depending on the zone setting and the shipping destination of the order

* Added shipping handling; the global shipping handling parameter has been
moved to each module



Index: authorizenet.php
===================================================================
RCS file: 
/cvsroot/tep/catalog/catalog/includes/modules/payment/authorizenet.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- authorizenet.php    3 Jan 2003 17:25:44 -0000       1.42
+++ authorizenet.php    14 Jan 2003 00:10:35 -0000      1.43
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,11 +15,35 @@
 
 // class constructor
     function authorizenet() {
+      global $order;
+
       $this->code = 'authorizenet';
       $this->title = MODULE_PAYMENT_AUTHORIZENET_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_AUTHORIZENET_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_AUTHORIZENET_STATUS == 'True') ? true 
: false);
 
+      if ((int)MODULE_PAYMENT_AUTHORIZENET_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_AUTHORIZENET_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_AUTHORIZENET_ZONE 
> 0) ) {
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_AUTHORIZENET_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->form_action_url = 
'https://secure.authorize.net/gateway/transact.dll';
     }
 
@@ -255,6 +279,8 @@
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Mode', 'MODULE_PAYMENT_AUTHORIZENET_TESTMODE', 
'Test', 'Transaction mode used for processing orders', '6', '0', 
'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Method', 'MODULE_PAYMENT_AUTHORIZENET_METHOD', 
'Credit Card', 'Transaction method used for processing orders', '6', '0', 
'tep_cfg_select_option(array(\'Credit Card\', \'eCheck\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Customer Notifications', 
'MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER', 'False', 'Should Authorize.Net 
e-mail a receipt to the customer?', '6', '0', 
'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
+      tep_db_query("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_AUTHORIZENET_ZONE', '0', 'If a zone is selected, only enable 
this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 
'tep_cfg_pull_down_zone_classes(', now())");
+      tep_db_query("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_AUTHORIZENET_ORDER_STATUS_ID', '0', 'Set the status of orders 
made with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -262,7 +288,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_AUTHORIZENET_STATUS', 
'MODULE_PAYMENT_AUTHORIZENET_LOGIN', 'MODULE_PAYMENT_AUTHORIZENET_TXNKEY', 
'MODULE_PAYMENT_AUTHORIZENET_TESTMODE', 'MODULE_PAYMENT_AUTHORIZENET_METHOD', 
'MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER');
+      return array('MODULE_PAYMENT_AUTHORIZENET_STATUS', 
'MODULE_PAYMENT_AUTHORIZENET_LOGIN', 'MODULE_PAYMENT_AUTHORIZENET_TXNKEY', 
'MODULE_PAYMENT_AUTHORIZENET_TESTMODE', 'MODULE_PAYMENT_AUTHORIZENET_METHOD', 
'MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER', 
'MODULE_PAYMENT_AUTHORIZENET_ZONE', 
'MODULE_PAYMENT_AUTHORIZENET_ORDER_STATUS_ID');
     }
   }
 ?>

Index: cc.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/cc.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- cc.php      25 Nov 2002 18:23:15 -0000      1.48
+++ cc.php      14 Jan 2003 00:10:36 -0000      1.49
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,10 +15,34 @@
 
 // class constructor
     function cc() {
+      global $order;
+
       $this->code = 'cc';
       $this->title = MODULE_PAYMENT_CC_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_CC_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_CC_STATUS == 'True') ? true : false);
+
+      if ((int)MODULE_PAYMENT_CC_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_CC_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_CC_ZONE > 0) ) {
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . 
"' and zone_country_id = '" . $order->billing['country']['id'] . "' order by 
zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
     }
 
 // class methods
@@ -162,6 +186,8 @@
     function install() {
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Enable Credit Card Module', 'MODULE_PAYMENT_CC_STATUS', 
'True', 'Do you want to accept credit card payments?', '6', '0', 
'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, date_added) 
values ('Split Credit Card E-Mail Address', 'MODULE_PAYMENT_CC_EMAIL', '', 'If 
an e-mail address is entered, the middle digits of the credit card number will 
be sent to the e-mail address (the outside digits are stored in the database 
with the middle digits censored)', '6', '0', now())");
+      tep_db_query("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_CC_ZONE', 
'0', 'If a zone is selected, only enable this payment method for that zone.', 
'6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', 
now())");
+      tep_db_query("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_CC_ORDER_STATUS_ID', '0', 'Set the status of orders made with 
this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -169,7 +195,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_CC_STATUS', 'MODULE_PAYMENT_CC_EMAIL');
+      return array('MODULE_PAYMENT_CC_STATUS', 'MODULE_PAYMENT_CC_EMAIL', 
'MODULE_PAYMENT_CC_ZONE', 'MODULE_PAYMENT_CC_ORDER_STATUS_ID');
     }
   }
 ?>

Index: cod.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/cod.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- cod.php     9 Jan 2003 15:47:25 -0000       1.23
+++ cod.php     14 Jan 2003 00:10:37 -0000      1.24
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -22,11 +22,18 @@
       $this->description = MODULE_PAYMENT_COD_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
 
-      if ( ($this->enabled == true) && (MODULE_PAYMENT_COD_ZONE != '0') ) {
+      if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
         $check_flag = false;
-        $check_query = tep_db_query("select zone_country_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . 
"'");
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . 
"' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by 
zone_id");
         while ($check = tep_db_fetch_array($check_query)) {
-          if ($check['zone_country_id'] == $order->delivery['country']['id']) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
             $check_flag = true;
             break;
           }
@@ -90,14 +97,15 @@
     function install() {
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Enable Cash On Delivery Module', 
'MODULE_PAYMENT_COD_STATUS', 'True', 'Do you want to accept Cash On Delevery 
payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', 
now());");
       tep_db_query("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_COD_ZONE', 
'0', 'If a zone is selected, only enable this payment method for that zone.', 
'6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', 
now())");
-    }
+      tep_db_query("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_COD_ORDER_STATUS_ID', '0', 'Set the status of orders made with 
this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
+   }
 
     function remove() {
       tep_db_query("delete from " . TABLE_CONFIGURATION . " where 
configuration_key in ('" . implode("', '", $this->keys()) . "')");
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_COD_STATUS', 'MODULE_PAYMENT_COD_ZONE');
+      return array('MODULE_PAYMENT_COD_STATUS', 'MODULE_PAYMENT_COD_ZONE', 
'MODULE_PAYMENT_COD_ORDER_STATUS_ID');
     }
   }
 ?>

Index: ipayment.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/ipayment.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- ipayment.php        25 Nov 2002 18:23:15 -0000      1.28
+++ ipayment.php        14 Jan 2003 00:10:38 -0000      1.29
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,11 +15,35 @@
 
 // class constructor
     function ipayment() {
+      global $order;
+
       $this->code = 'ipayment';
       $this->title = MODULE_PAYMENT_IPAYMENT_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_IPAYMENT_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_IPAYMENT_STATUS == 'True') ? true : 
false);
 
+      if ((int)MODULE_PAYMENT_IPAYMENT_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_IPAYMENT_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_IPAYMENT_ZONE > 0) 
) {
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_IPAYMENT_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->form_action_url = 'https://ipayment.de/merchant/' . 
MODULE_PAYMENT_IPAYMENT_ID . '/processor.php';
     }
 
@@ -197,6 +221,8 @@
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, date_added) 
values ('User ID', 'MODULE_PAYMENT_IPAYMENT_USER_ID', '99999', 'The user ID for 
the iPayment service', '6', '3', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, date_added) 
values ('User Password', 'MODULE_PAYMENT_IPAYMENT_PASSWORD', '0', 'The user 
password for the iPayment service', '6', '4', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Currency', 'MODULE_PAYMENT_IPAYMENT_CURRENCY', 
'Either EUR or USD, else EUR', 'The currency to use for credit card 
transactions', '6', '5', 'tep_cfg_select_option(array(\'Always EUR\', \'Always 
USD\', \'Either EUR or USD, else EUR\', \'Either EUR or USD, else USD\'), ', 
now())");
+      tep_db_query("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_IPAYMENT_ZONE', '0', 'If a zone is selected, only enable this 
payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 
'tep_cfg_pull_down_zone_classes(', now())");
+      tep_db_query("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_IPAYMENT_ORDER_STATUS_ID', '0', 'Set the status of orders made 
with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -204,7 +230,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_IPAYMENT_STATUS', 
'MODULE_PAYMENT_IPAYMENT_ID', 'MODULE_PAYMENT_IPAYMENT_USER_ID', 
'MODULE_PAYMENT_IPAYMENT_PASSWORD', 'MODULE_PAYMENT_IPAYMENT_CURRENCY');
+      return array('MODULE_PAYMENT_IPAYMENT_STATUS', 
'MODULE_PAYMENT_IPAYMENT_ID', 'MODULE_PAYMENT_IPAYMENT_USER_ID', 
'MODULE_PAYMENT_IPAYMENT_PASSWORD', 'MODULE_PAYMENT_IPAYMENT_CURRENCY', 
'MODULE_PAYMENT_IPAYMENT_ZONE', 'MODULE_PAYMENT_IPAYMENT_ORDER_STATUS_ID');
     }
   }
 ?>

Index: moneyorder.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/moneyorder.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- moneyorder.php      25 Nov 2002 18:23:15 -0000      1.5
+++ moneyorder.php      14 Jan 2003 00:10:38 -0000      1.6
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,11 +15,35 @@
 
 // class constructor
     function moneyorder() {
+      global $order;
+
       $this->code = 'moneyorder';
       $this->title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : 
false);
 
+      if ((int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 
0) ) {
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_MONEYORDER_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->email_footer = MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER;
     }
 
@@ -67,6 +91,8 @@
 
     function install() {
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Enable Check/Money Order Module', 
'MODULE_PAYMENT_MONEYORDER_STATUS', 'True', 'Do you want to accept Check/Money 
Order payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), 
', now());");
+      tep_db_query("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_MONEYORDER_ZONE', '0', 'If a zone is selected, only enable this 
payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 
'tep_cfg_pull_down_zone_classes(', now())");
+      tep_db_query("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_MONEYORDER_ORDER_STATUS_ID', '0', 'Set the status of orders 
made with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -74,7 +100,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_MONEYORDER_STATUS');
+      return array('MODULE_PAYMENT_MONEYORDER_STATUS', 
'MODULE_PAYMENT_MONEYORDER_ZONE', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID');
     }
   }
 ?>

Index: nochex.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/nochex.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- nochex.php  25 Nov 2002 18:23:15 -0000      1.8
+++ nochex.php  14 Jan 2003 00:10:39 -0000      1.9
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,11 +15,35 @@
 
 // class constructor
     function nochex() {
+      global $order;
+
       $this->code = 'nochex';
       $this->title = MODULE_PAYMENT_NOCHEX_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_NOCHEX_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_NOCHEX_STATUS == 'True') ? true : 
false);
 
+      if ((int)MODULE_PAYMENT_NOCHEX_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_NOCHEX_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_NOCHEX_ZONE > 0) ) 
{
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_NOCHEX_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->form_action_url = 'https://www.nochex.com/nochex.dll/checkout';
     }
 
@@ -77,6 +101,8 @@
     function install() {
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Enable NOCHEX Module', 'MODULE_PAYMENT_NOCHEX_STATUS', 
'True', 'Do you want to accept NOCHEX payments?', '6', '3', 
'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, date_added) 
values ('E-Mail Address', 'MODULE_PAYMENT_NOCHEX_ID', 
'you-0/H1Xqmg7/hi3DnVkjdj9g@xxxxxxxxxxxxxxxx', 'The e-mail address to use for 
the NOCHEX service', '6', '4', now())");
+      tep_db_query("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_NOCHEX_ZONE', 
'0', 'If a zone is selected, only enable this payment method for that zone.', 
'6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', 
now())");
+      tep_db_query("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_NOCHEX_ORDER_STATUS_ID', '0', 'Set the status of orders made 
with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -84,7 +110,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_NOCHEX_STATUS', 'MODULE_PAYMENT_NOCHEX_ID');
+      return array('MODULE_PAYMENT_NOCHEX_STATUS', 'MODULE_PAYMENT_NOCHEX_ID', 
'MODULE_PAYMENT_NOCHEX_ZONE', 'MODULE_PAYMENT_NOCHEX_ORDER_STATUS_ID');
     }
   }
 ?>

Index: paypal.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/paypal.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- paypal.php  25 Nov 2002 18:23:15 -0000      1.35
+++ paypal.php  14 Jan 2003 00:10:39 -0000      1.36
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,11 +15,35 @@
 
 // class constructor
     function paypal() {
+      global $order;
+
       $this->code = 'paypal';
       $this->title = MODULE_PAYMENT_PAYPAL_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? true : 
false);
 
+      if ((int)MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) 
{
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->form_action_url = 'https://secure.paypal.com/cgi-bin/webscr';
     }
 
@@ -88,6 +112,8 @@
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Enable PayPal Module', 'MODULE_PAYMENT_PAYPAL_STATUS', 
'True', 'Do you want to accept PayPal payments?', '6', '3', 
'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, date_added) 
values ('E-Mail Address', 'MODULE_PAYMENT_PAYPAL_ID', 
'you-kees+IjogN1i3DnVkjdj9g@xxxxxxxxxxxxxxxx', 'The e-mail address to use for 
the PayPal service', '6', '4', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PAYPAL_CURRENCY', 
'Selected Currency', 'The currency to use for credit card transactions', '6', 
'6', 'tep_cfg_select_option(array(\'Selected Currency\',\'Only USD\',\'Only 
CAD\',\'Only EUR\',\'Only GBP\',\'Only JPY\'), ', now())");
+      tep_db_query("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_PAYPAL_ZONE', 
'0', 'If a zone is selected, only enable this payment method for that zone.', 
'6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', 
now())");
+      tep_db_query("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_PAYPAL_ORDER_STATUS_ID', '0', 'Set the status of orders made 
with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -95,7 +121,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_PAYPAL_STATUS', 'MODULE_PAYMENT_PAYPAL_ID', 
'MODULE_PAYMENT_PAYPAL_CURRENCY');
+      return array('MODULE_PAYMENT_PAYPAL_STATUS', 'MODULE_PAYMENT_PAYPAL_ID', 
'MODULE_PAYMENT_PAYPAL_CURRENCY', 'MODULE_PAYMENT_PAYPAL_ZONE', 
'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID');
     }
   }
 ?>

Index: pm2checkout.php
===================================================================
RCS file: 
/cvsroot/tep/catalog/catalog/includes/modules/payment/pm2checkout.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pm2checkout.php     25 Nov 2002 18:23:15 -0000      1.15
+++ pm2checkout.php     14 Jan 2003 00:10:39 -0000      1.16
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,13 +15,35 @@
 
 // class constructor
     function pm2checkout() {
-      global $HTTP_POST_VARS;
+      global $order;
 
       $this->code = 'pm2checkout';
       $this->title = MODULE_PAYMENT_2CHECKOUT_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_2CHECKOUT_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_2CHECKOUT_STATUS == 'True') ? true : 
false);
 
+      if ((int)MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_2CHECKOUT_ZONE > 
0) ) {
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_2CHECKOUT_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->form_action_url = 
'https://www.2checkout.com/cgi-bin/Abuyers/purchase.2c';
     }
 
@@ -181,6 +203,8 @@
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, date_added) 
values ('Login/Store Number', 'MODULE_PAYMENT_2CHECKOUT_LOGIN', '18157', 
'Login/Store Number used for the 2CheckOut service', '6', '0', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Mode', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 
'Test', 'Transaction mode used for the 2Checkout service', '6', '0', 
'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Merchant Notifications', 
'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'True', 'Should 2CheckOut e-mail a 
receipt to the store owner?', '6', '0', 'tep_cfg_select_option(array(\'True\', 
\'False\'), ', now())");
+      tep_db_query("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_2CHECKOUT_ZONE', '0', 'If a zone is selected, only enable this 
payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 
'tep_cfg_pull_down_zone_classes(', now())");
+      tep_db_query("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_2CHECKOUT_ORDER_STATUS_ID', '0', 'Set the status of orders made 
with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -188,7 +212,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_2CHECKOUT_STATUS', 
'MODULE_PAYMENT_2CHECKOUT_LOGIN', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 
'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT');
+      return array('MODULE_PAYMENT_2CHECKOUT_STATUS', 
'MODULE_PAYMENT_2CHECKOUT_LOGIN', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 
'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'MODULE_PAYMENT_2CHECKOUT_ZONE', 
'MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID');
     }
   }
 ?>

Index: psigate.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/psigate.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- psigate.php 25 Nov 2002 18:23:15 -0000      1.12
+++ psigate.php 14 Jan 2003 00:10:40 -0000      1.13
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,11 +15,35 @@
 
 // class constructor
     function psigate() {
+      global $order;
+
       $this->code = 'psigate';
       $this->title = MODULE_PAYMENT_PSIGATE_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_PSIGATE_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_PSIGATE_STATUS == 'True') ? true : 
false);
 
+      if ((int)MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PSIGATE_ZONE > 0) 
) {
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_PSIGATE_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->form_action_url = 'https://order.psigate.com/psigate.asp';
     }
 
@@ -227,6 +251,8 @@
       tep_db_query("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_PSIGATE_TRANSACTION_TYPE', 'PreAuth', 'Transaction type to use 
for the PSiGate service', '6', '4', 'tep_cfg_select_option(array(\'Sale\', 
\'PreAuth\', \'PostAuth\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Credit Card Collection', 
'MODULE_PAYMENT_PSIGATE_INPUT_MODE', 'Local', 'Should the credit card details 
be collected locally or remotely at PSiGate?', '6', '5', 
'tep_cfg_select_option(array(\'Local\', \'Remote\'), ', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PSIGATE_CURRENCY', 
'USD', 'The currency to use for credit card transactions', '6', '6', 
'tep_cfg_select_option(array(\'CAD\', \'USD\'), ', now())");
+      tep_db_query("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_PSIGATE_ZONE', '0', 'If a zone is selected, only enable this 
payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 
'tep_cfg_pull_down_zone_classes(', now())");
+      tep_db_query("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_PSIGATE_ORDER_STATUS_ID', '0', 'Set the status of orders made 
with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -234,7 +260,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_PSIGATE_STATUS', 
'MODULE_PAYMENT_PSIGATE_MERCHANT_ID', 
'MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE', 
'MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE', 'MODULE_PAYMENT_PSIGATE_INPUT_MODE', 
'MODULE_PAYMENT_PSIGATE_CURRENCY');
+      return array('MODULE_PAYMENT_PSIGATE_STATUS', 
'MODULE_PAYMENT_PSIGATE_MERCHANT_ID', 
'MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE', 
'MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE', 'MODULE_PAYMENT_PSIGATE_INPUT_MODE', 
'MODULE_PAYMENT_PSIGATE_CURRENCY', 'MODULE_PAYMENT_PSIGATE_ZONE', 
'MODULE_PAYMENT_PSIGATE_ORDER_STATUS_ID');
     }
   }
 ?>

Index: secpay.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/secpay.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- secpay.php  25 Nov 2002 18:23:15 -0000      1.27
+++ secpay.php  14 Jan 2003 00:10:40 -0000      1.28
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -15,11 +15,35 @@
 
 // class constructor
     function secpay() {
+      global $order;
+
       $this->code = 'secpay';
       $this->title = MODULE_PAYMENT_SECPAY_TEXT_TITLE;
       $this->description = MODULE_PAYMENT_SECPAY_TEXT_DESCRIPTION;
       $this->enabled = ((MODULE_PAYMENT_SECPAY_STATUS == 'True') ? true : 
false);
 
+      if ((int)MODULE_PAYMENT_SECPAY_ORDER_STATUS_ID > 0) {
+        $this->order_status = MODULE_PAYMENT_SECPAY_ORDER_STATUS_ID;
+      }
+
+      if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_SECPAY_ZONE > 0) ) 
{
+        $check_flag = false;
+        $check_query = tep_db_query("select zone_id from " . 
TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . 
MODULE_PAYMENT_SECPAY_ZONE . "' and zone_country_id = '" . 
$order->billing['country']['id'] . "' order by zone_id");
+        while ($check = tep_db_fetch_array($check_query)) {
+          if ($check['zone_id'] < 1) {
+            $check_flag = true;
+            break;
+          } elseif ($check['zone_id'] == $order->billing['zone_id']) {
+            $check_flag = true;
+            break;
+          }
+        }
+
+        if ($check_flag == false) {
+          $this->enabled = false;
+        }
+      }
+
       $this->form_action_url = 'https://www.secpay.com/java-bin/ValCard';
     }
 
@@ -141,6 +165,8 @@
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, date_added) 
values ('Merchant ID', 'MODULE_PAYMENT_SECPAY_MERCHANT_ID', 'secpay', 'Merchant 
ID to use for the SECPay service', '6', '2', now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Currency', 'MODULE_PAYMENT_SECPAY_CURRENCY', 
'Any Currency', 'The currency to use for credit card transactions', '6', '3', 
'tep_cfg_select_option(array(\'Any Currency\', \'Default Currency\'), ', 
now())");
       tep_db_query("insert into " . TABLE_CONFIGURATION . " 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order, set_function, 
date_added) values ('Transaction Mode', 'MODULE_PAYMENT_SECPAY_TEST_STATUS', 
'Always Successful', 'Transaction mode to use for the SECPay service', '6', 
'4', 'tep_cfg_select_option(array(\'Always Successful\', \'Always Fail\', 
\'Production\'), ', now())");
+      tep_db_query("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_SECPAY_ZONE', 
'0', 'If a zone is selected, only enable this payment method for that zone.', 
'6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', 
now())");
+      tep_db_query("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_SECPAY_ORDER_STATUS_ID', '0', 'Set the status of orders made 
with this payment module to this value', '6', '0', 
'tep_cfg_pull_down_order_statuses(', 'tep_get_order_Status_name', now())");
     }
 
     function remove() {
@@ -148,7 +174,7 @@
     }
 
     function keys() {
-      return array('MODULE_PAYMENT_SECPAY_STATUS', 
'MODULE_PAYMENT_SECPAY_MERCHANT_ID', 'MODULE_PAYMENT_SECPAY_CURRENCY', 
'MODULE_PAYMENT_SECPAY_TEST_STATUS');
+      return array('MODULE_PAYMENT_SECPAY_STATUS', 
'MODULE_PAYMENT_SECPAY_MERCHANT_ID', 'MODULE_PAYMENT_SECPAY_CURRENCY', 
'MODULE_PAYMENT_SECPAY_TEST_STATUS', 'MODULE_PAYMENT_SECPAY_ZONE', 
'MODULE_PAYMENT_SECPAY_ORDER_STATUS_ID');
     }
   }
 ?>



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en


<Prev in Thread] Current Thread [Next in Thread>