phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] cart/inc class.payment.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] cart/inc class.payment.inc.php
Date: Sat, 09 Sep 2006 14:39:14 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    cart
Changes by:     Dave Hall <skwashd>     06/09/09 14:39:14

Modified files:
        inc            : class.payment.inc.php 

Log message:
        code cleanup

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cart/inc/class.payment.inc.php?cvsroot=phpgroupware&r1=1.1&r2=1.2

Patches:
Index: class.payment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/cart/inc/class.payment.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- class.payment.inc.php       20 Mar 2002 12:49:41 -0000      1.1
+++ class.payment.inc.php       9 Sep 2006 14:39:14 -0000       1.2
@@ -10,12 +10,29 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-  /* $Id: class.payment.inc.php,v 1.1 2002/03/20 12:49:41 milosch Exp $ */
+  /* $Id: class.payment.inc.php,v 1.2 2006/09/09 14:39:14 skwashd Exp $ */
 
-       if (empty($GLOBALS['phpgw_info']['server']['cart_payment_type']))
+       $payment = '';
+       if ( !isset($GLOBALS['phpgw_info']['server']['cart_payment_type'])
+               || empty($GLOBALS['phpgw_info']['server']['cart_payment_type']) 
)
        {
-               $GLOBALS['phpgw_info']['server']['cart_payment_type'] = 'echo';
+               $payment = 'echo';
        }
-       include(PHPGW_APP_INC . '/class.payment_' . 
$GLOBALS['phpgw_info']['server']['cart_payment_type'] . '.inc.php');
+       else
+       {
+               switch ( $GLOBALS['phpgw_info']['server']['cart_payment_type'] )
+               {
+                       case 'authorizenet':
+                               $payment = 'authoriznet';
+                               break;
+                       case 'pfp':
+                               $payment = 'pfp';
+                               break;
+                       case 'echo':
+                       default:
+                               $payment = 'echo';
+               }
+       }
+       include(PHPGW_APP_INC . "/class.payment_{$payment}.inc.php");
        include(PHPGW_APP_INC . '/class.payment_shared.inc.php');
 ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]