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

List:       tep-commits
Subject:    [TEP-COMMIT] CVS: catalog/catalog/includes/modules/payment ipayment.php,1.36,1.37 nochex.php,1.13,1.
From:       Harald Ponce de Leon <hpdl () users ! sourceforge ! net>
Date:       2003-12-18 23:52:17
[Download RAW message or body]

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

Modified Files:
	ipayment.php nochex.php paypal.php psigate.php secpay.php 
Log Message:
update the currencies class

* $currencies -> $osC_Currencies

* $currencies->display_price() -> $osC_Currencies->displayPrice()
  +-- now passes the product tax class id as a parameter instead of the
      product tax rate value (saves queries when DISPLAY_PRICES_WITH_TAX
      is disabled)

* $currencies->is_set()
  +-- removed due to $osC_Currencies->exists()

* $currencies->get_decimal_places() -> $osC_Currencies->decimalPlaces()

* $currencies->get_value() -> $osC_Currencies->value()

* $osC_Currencies->format()
  +-- removed $calculate_currency_value (second) parameter due to
      redundancy - if the number should not be calculated with the currency
      rate, a value of '1' should be passed as the currency rate value


Index: ipayment.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/ipayment.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- ipayment.php	4 Dec 2003 23:14:00 -0000	1.36
+++ ipayment.php	18 Dec 2003 23:52:15 -0000	1.37
@@ -161,7 +161,7 @@
     }
 
     function process_button() {
-      global $osC_Session, $order, $currencies;
+      global $osC_Session, $order, $osC_Currencies;
 
       if (PHP_VERSION < 4.1) {
         global $_POST;
@@ -194,7 +194,7 @@
 
       $process_button_string = tep_draw_hidden_field('trxuser_id', \
                MODULE_PAYMENT_IPAYMENT_USER_ID) .
                                tep_draw_hidden_field('trxpassword', \
                MODULE_PAYMENT_IPAYMENT_PASSWORD) .
-                               tep_draw_hidden_field('trx_amount', \
number_format($order->info['total'] * 100 * $currencies->get_value($trx_currency), 0, \
'','')) . +                               tep_draw_hidden_field('trx_amount', \
number_format($order->info['total'] * 100 * $osC_Currencies->value($trx_currency), 0, \
                '','')) .
                                tep_draw_hidden_field('trx_currency', $trx_currency) \
                .
                                tep_draw_hidden_field('trx_paymenttyp', 'cc') .
                                tep_draw_hidden_field('addr_name', \
$_POST['ipayment_cc_owner']) . @@ -218,7 +218,7 @@
       }
 
       if (tep_not_null(MODULE_PAYMENT_IPAYMENT_SECURITY_KEY)) {
-        $process_button_string .= tep_draw_hidden_field('trx_securityhash', \
md5(MODULE_PAYMENT_IPAYMENT_USER_ID . number_format($order->info['total'] * 100 * \
$currencies->get_value($trx_currency), 0, '','') . $trx_currency . \
MODULE_PAYMENT_IPAYMENT_PASSWORD . MODULE_PAYMENT_IPAYMENT_SECURITY_KEY)); +        \
$process_button_string .= tep_draw_hidden_field('trx_securityhash', \
md5(MODULE_PAYMENT_IPAYMENT_USER_ID . number_format($order->info['total'] * 100 * \
$osC_Currencies->value($trx_currency), 0, '','') . $trx_currency . \
MODULE_PAYMENT_IPAYMENT_PASSWORD . MODULE_PAYMENT_IPAYMENT_SECURITY_KEY));  }
 
       return $process_button_string;

Index: nochex.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/nochex.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- nochex.php	17 Nov 2003 20:34:31 -0000	1.13
+++ nochex.php	18 Dec 2003 23:52:15 -0000	1.14
@@ -73,11 +73,11 @@
     }
 
     function process_button() {
-      global $order, $currencies, $osC_Customer;
+      global $order, $osC_Currencies, $osC_Customer;
 
       $process_button_string = tep_draw_hidden_field('cmd', '_xclick') .
                                tep_draw_hidden_field('email', \
                MODULE_PAYMENT_NOCHEX_ID) .
-                               tep_draw_hidden_field('amount', \
number_format($order->info['total'] * $currencies->currencies['GBP']['value'], \
$currencies->currencies['GBP']['decimal_places'])) . +                               \
tep_draw_hidden_field('amount', number_format($order->info['total'] * \
$osC_Currencies->currencies['GBP']['value'], \
                $osC_Currencies->currencies['GBP']['decimal_places'])) .
                                tep_draw_hidden_field('ordernumber', \
                $osC_Customer->id . '-' . date('Ymdhis')) .
                                tep_draw_hidden_field('returnurl', \
                tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .
                                tep_draw_hidden_field('cancel_return', \
tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

Index: paypal.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/paypal.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- paypal.php	17 Nov 2003 20:34:31 -0000	1.40
+++ paypal.php	18 Dec 2003 23:52:15 -0000	1.41
@@ -73,7 +73,7 @@
     }
 
     function process_button() {
-      global $osC_Session, $order, $currencies;
+      global $osC_Session, $order, $osC_Currencies;
 
       if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {
         $my_currency = $osC_Session->value('currency');
@@ -86,8 +86,8 @@
       $process_button_string = tep_draw_hidden_field('cmd', '_xclick') .
                                tep_draw_hidden_field('business', \
                MODULE_PAYMENT_PAYPAL_ID) .
                                tep_draw_hidden_field('item_name', STORE_NAME) .
-                               tep_draw_hidden_field('amount', \
number_format(($order->info['total'] - $order->info['shipping_cost']) * \
$currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) \
                .
-                               tep_draw_hidden_field('shipping', \
number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), \
$currencies->get_decimal_places($my_currency))) . +                               \
tep_draw_hidden_field('amount', number_format(($order->info['total'] - \
$order->info['shipping_cost']) * $osC_Currencies->value($my_currency), \
$osC_Currencies->decimalPlaces($my_currency))) . +                               \
tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * \
$osC_Currencies->value($my_currency), $osC_Currencies->decimalPlaces($my_currency))) \
                .
                                tep_draw_hidden_field('currency_code', $my_currency) \
                .
                                tep_draw_hidden_field('return', \
                tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .
                                tep_draw_hidden_field('cancel_return', \
tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

Index: psigate.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/psigate.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- psigate.php	5 Dec 2003 00:08:58 -0000	1.19
+++ psigate.php	18 Dec 2003 23:52:15 -0000	1.20
@@ -168,7 +168,7 @@
     }
 
     function process_button() {
-      global $order, $currencies;
+      global $order, $osC_Currencies;
 
       if (PHP_VERSION < 4.1) {
         global $_POST;
@@ -210,7 +210,7 @@
       }
 
       $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), \
$currencies->currencies[MODULE_PAYMENT_PSIGATE_CURRENCY]['decimal_places'])) . +      \
tep_draw_hidden_field('FullTotal', number_format($order->info['total'] * \
$osC_Currencies->value(MODULE_PAYMENT_PSIGATE_CURRENCY), \
                $osC_Currencies->currencies[MODULE_PAYMENT_PSIGATE_CURRENCY]['decimal_places'])) \
                .
                                tep_draw_hidden_field('ThanksURL', \
tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) .  \
tep_draw_hidden_field('NoThanksURL', tep_href_link(FILENAME_CHECKOUT_PAYMENT, \
'payment_error=' . $this->code . $payment_error_return, 'SSL')) .  \
tep_draw_hidden_field('Bname', ((MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') ? \
$_POST['psigate_cc_owner'] : $order->billing['firstname'] . ' ' . \
$order->billing['lastname'])) .

Index: secpay.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/payment/secpay.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- secpay.php	17 Nov 2003 20:34:31 -0000	1.32
+++ secpay.php	18 Dec 2003 23:52:15 -0000	1.33
@@ -73,7 +73,7 @@
     }
 
     function process_button() {
-      global $osC_Session, $order, $currencies;
+      global $osC_Session, $order, $osC_Currencies;
 
       switch (MODULE_PAYMENT_SECPAY_CURRENCY) {
         case 'Default Currency':
@@ -100,7 +100,7 @@
 
       $process_button_string = tep_draw_hidden_field('merchant', \
                MODULE_PAYMENT_SECPAY_MERCHANT_ID) .
                                tep_draw_hidden_field('trans_id', STORE_NAME . \
                date('Ymdhis')) .
-                               tep_draw_hidden_field('amount', \
number_format($order->info['total'] * $currencies->get_value($sec_currency), \
$currencies->currencies[$sec_currency]['decimal_places'], '.', '')) . +               \
tep_draw_hidden_field('amount', number_format($order->info['total'] * \
$osC_Currencies->value($sec_currency), \
                $osC_Currencies->currencies[$sec_currency]['decimal_places'], '.', \
                '')) .
                                tep_draw_hidden_field('bill_name', \
                $order->billing['firstname'] . ' ' . $order->billing['lastname']) .
                                tep_draw_hidden_field('bill_addr_1', \
                $order->billing['street_address']) .
                                tep_draw_hidden_field('bill_addr_2', \
$order->billing['suburb']) .



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
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