[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tep-commits
Subject:    [TEP-COMMIT] CVS: catalog/catalog/includes/modules/payment authorizenet.php,1.35,1.36 pm2checkout.ph
From:       Mark Evans <project3000 () users ! sourceforge ! net>
Date:       2002-07-27 13:39:31
[Download RAW message or body]

Update of /cvsroot/tep/catalog/catalog/includes/modules/payment
In directory usw-pr-cvs1:/tmp/cvs-serv22977/modules/payment

Modified Files:
	authorizenet.php pm2checkout.php psigate.php secpay.php 
Log Message:
Add ISO country codes to the order class.

The country field in the order class is now an array which contains the ISO
country codes and country id.

This will mean that we no longer need to run a query in the payment
modules to retrieve this information.

Index: authorizenet.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/authorizenet.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- authorizenet.php	3 Jun 2002 12:36:31 -0000	1.35
+++ authorizenet.php	27 Jul 2002 13:39:28 -0000	1.36
@@ -117,7 +117,7 @@
                                tep_draw_hidden_field('x_city', \
                $order->customer['city']) .
                                tep_draw_hidden_field('x_state', \
                $order->customer['state']) .
                                tep_draw_hidden_field('x_zip', \
                $order->customer['postcode']) .
-                               tep_draw_hidden_field('x_country', \
$order->customer['country']) . +                               \
                tep_draw_hidden_field('x_country', \
                $order->customer['country']['title']) .
                                tep_draw_hidden_field('x_phone', \
                $order->customer['telephone']) .
                                tep_draw_hidden_field('x_email', \
                $order->customer['email_address']) .
                                tep_draw_hidden_field('x_ship_to_first_name', \
$order->delivery['firstname']) . @@ -126,7 +126,7 @@
                                tep_draw_hidden_field('x_ship_to_city', \
                $order->delivery['city']) .
                                tep_draw_hidden_field('x_ship_to_state', \
                $order->delivery['state']) .
                                tep_draw_hidden_field('x_ship_to_zip', \
                $order->delivery['postcode']) .
-                               tep_draw_hidden_field('x_ship_to_country', \
$order->delivery['country']) . +                               \
                tep_draw_hidden_field('x_ship_to_country', \
                $order->delivery['country']['title']) .
                                tep_draw_hidden_field('x_Customer_IP', \
                $HTTP_SERVER_VARS['REMOTE_ADDR']);
       if (MODULE_PAYMENT_AUTHORIZENET_TESTMODE == '1') $process_button_string .= \
tep_draw_hidden_field('x_Test_Request', 'TRUE');  

Index: pm2checkout.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/pm2checkout.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- pm2checkout.php	5 Jun 2002 17:57:17 -0000	1.10
+++ pm2checkout.php	27 Jul 2002 13:39:28 -0000	1.11
@@ -112,7 +112,7 @@
                                tep_draw_hidden_field('x_city', \
                $order->customer['city']) .
                                tep_draw_hidden_field('x_state', \
                $order->customer['state']) .
                                tep_draw_hidden_field('x_zip', \
                $order->customer['postcode']) .
-                               tep_draw_hidden_field('x_country', \
$order->customer['country']) . +                               \
                tep_draw_hidden_field('x_country', \
                $order->customer['country']['title']) .
                                tep_draw_hidden_field('x_email', \
                $order->customer['email_address']) .
                                tep_draw_hidden_field('x_phone', \
                $order->customer['telephone']) .
                                tep_draw_hidden_field('x_ship_to_first_name', \
$order->delivery['firstname']) . @@ -121,7 +121,7 @@
                                tep_draw_hidden_field('x_ship_to_city', \
                $order->delivery['city']) .
                                tep_draw_hidden_field('x_ship_to_state', \
                $order->delivery['state']) .
                                tep_draw_hidden_field('x_ship_to_zip', \
                $order->delivery['postcode']) .
-                               tep_draw_hidden_field('x_ship_to_country', \
$order->delivery['country']) . +                               \
                tep_draw_hidden_field('x_ship_to_country', \
                $order->delivery['country']['title']) .
                                tep_draw_hidden_field('x_receipt_link_url', \
                tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .
                                tep_draw_hidden_field('x_email_merchant', \
MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT);  

Index: psigate.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/psigate.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- psigate.php	31 May 2002 16:48:28 -0000	1.5
+++ psigate.php	27 Jul 2002 13:39:28 -0000	1.6
@@ -136,16 +136,6 @@
     function process_button() {
       global $HTTP_POST_VARS, $HTTP_SERVER_VARS, $CardNumber, $psigate_cc_owner, \
$psigate_cc_expires_month, $psigate_cc_expires_year, $order, $customer_id, \
$currencies;  
-      $countries_query = tep_db_query("select countries_iso_code_2 from " . \
TABLE_COUNTRIES . " where countries_name in ('" . $order->customer['country'] . "', \
                '" . $order->delivery['country'] . "')");
-      while ($countries = tep_db_fetch_array($countries_query)) {
-        if (isset($Bcountry)) {
-          $Scountry = $countries['countries_iso_code_2'];
-        } else {
-          $Bcountry = $countries['countries_iso_code_2'];
-        }
-      }
-      if (!isset($Scountry)) $Scountry = $Bcountry;
-
       $process_button_string = tep_draw_hidden_field('MerchantID', \
MODULE_PAYMENT_PSIGATE_MERCHANT_ID) .  tep_draw_hidden_field('FullTotal', \
number_format($order->info['total'] * \
                $currencies->get_value(MODULE_PAYMENT_PSIGATE_CURRENCY), 2)) .
                                tep_draw_hidden_field('ThanksURL', \
tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) .  @@ -155,7 +145,7 @@
                                tep_draw_hidden_field('Bcity', \
                $order->customer['city']) .
                                tep_draw_hidden_field('Bstate', \
                $order->customer['state']) .
                                tep_draw_hidden_field('Bzip', \
                $order->customer['postcode']) .
-                               tep_draw_hidden_field('Bcountry', $Bcountry) .
+                               tep_draw_hidden_field('Bcountry', \
                $order->customer['country']['iso_code_2']) .
                                tep_draw_hidden_field('Phone', \
                $order->customer['telephone']) .
                                tep_draw_hidden_field('Email', \
                $order->customer['email_address']) .
                                tep_draw_hidden_field('Sname', \
$order->delivery['firstname'] . ' ' . $order->delivery['lastname']) . @@ -163,7 \
                +153,7 @@
                                tep_draw_hidden_field('Scity', \
                $order->delivery['city']) .
                                tep_draw_hidden_field('Sstate', \
                $order->delivery['state']) .
                                tep_draw_hidden_field('Szip', \
                $order->delivery['postcode']) .
-                               tep_draw_hidden_field('Scountry', $Scountry) .
+                               tep_draw_hidden_field('Scountry', \
                $order->delivery['country']['iso_code_2']) .
                                tep_draw_hidden_field('ChargeType', \
                MODULE_PAYMENT_PSIGATE_TRANSACTION_TYPE) .
                                tep_draw_hidden_field('Result', \
                MODULE_PAYMENT_PSIGATE_TRANSACTION_MODE) .
                                tep_draw_hidden_field('IP', \
$HTTP_SERVER_VARS['REMOTE_ADDR']);

Index: secpay.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/secpay.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- secpay.php	31 May 2002 18:17:43 -0000	1.21
+++ secpay.php	27 Jul 2002 13:39:28 -0000	1.22
@@ -52,7 +52,7 @@
                                tep_draw_hidden_field('bill_city', \
                $order->customer['city']) .
                                tep_draw_hidden_field('bill_state', \
                $order->customer['state']) .
                                tep_draw_hidden_field('bill_post_code', \
                $order->customer['postcode']) .
-                               tep_draw_hidden_field('bill_country', \
$order->customer['country']) . +                               \
                tep_draw_hidden_field('bill_country', \
                $order->customer['country']['title']) .
                                tep_draw_hidden_field('bill_tel', \
                $order->customer['telephone']) .
                                tep_draw_hidden_field('bill_email', \
                $order->customer['email_address']) .
                                tep_draw_hidden_field('ship_name', \
$order->delivery['firstname'] . ' ' . $order->delivery['lastname']) . @@ -61,7 +61,7 \
                @@
                                tep_draw_hidden_field('ship_city', \
                $order->delivery['city']) .
                                tep_draw_hidden_field('ship_state', \
                $order->delivery['state']) .
                                tep_draw_hidden_field('ship_post_code', \
                $order->delivery['postcode']) .
-                               tep_draw_hidden_field('ship_country', \
$order->delivery['country']) . +                               \
                tep_draw_hidden_field('ship_country', \
                $order->delivery['country']['title']) .
                                tep_draw_hidden_field('currency', \
                MODULE_PAYMENT_SECPAY_CURRENCY) .
                                tep_draw_hidden_field('callback', \
                tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false)) .
                                tep_draw_hidden_field(tep_session_name(), \
tep_session_id()) .



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tep-commits mailing list
Tep-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tep-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic