Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezcheckoutsuppliergateway.php
Go to the documentation of this file.
1 <?
3 //
4 // $Id: ezcheckoutsuppliergateway.php,v 1.2 2001/02/20 16:12:48 bf Exp $
5 //
6 // Definition of eZCheckoutSupplier class
7 //
8 // B�rd Farstad <bf@ez.no>
9 // Created on: <02-Feb-2001 15:22:14 bf>
10 //
11 // This source file is part of Exponential Basic, publishing software.
12 // Copyright (C) 1999-2000 eZ systems as
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
31
34 // include_once( "classes/INIFile.php" );
35 class eZCheckoutSupplierGateway
36 {
40 function __construct()
41 {
42
43 $ini =& eZINI::instance( 'site.ini' );
44 $PaymentMethods = $ini->variable( "Checkout", "PaymentMethods" );
45 $paymentArray = explode(';',$PaymentMethods);
46 $i=1;
47 foreach($paymentArray as $paymentItem)
48 {
49 $paymentItemArray = explode('|',$paymentItem);
50 $this->PaymentMethods[] = array( "ID" => $i, "Text" => $paymentItemArray[0] );
51 $i++;
52 }
53 }
54
64 function &paymentMethods( )
65 {
66 return $this->PaymentMethods;
67 }
68
72 function &paymentName( $id )
73 {
74 $ret = "unknown";
75 foreach ( $this->PaymentMethods as $paymentMethod )
76 {
77 if ( $paymentMethod["ID"] == $id )
78 {
79 $ret = $paymentMethod["Text"];
80 }
81 }
82
83 return $ret;
84 }
85
89 function &paymentFile( $id )
90 {
91 $ini =& eZINI::instance( 'site.ini' );
92 $PaymentMethods = $ini->variable( "Checkout", "PaymentMethods" );
93 $paymentArray = explode(';',$PaymentMethods);
94 $i=1;
95 foreach ($paymentArray as $paymentArrayItem)
96 {
97 $retArray = explode('|',$paymentArrayItem);
98 if ( $id == $i )
99 $ret = "kernel/eztrade/user/payment/".$retArray[1];
100 elseif ($i == 1 && $id != $i)
101 $ret = "kernel/eztrade/user/payment/".$retArray[1];
102 $i++;
103 }
104
105 return $ret;
106 }
107 var $PaymentMethods;
108 }
109
110 ?>
$i
$i
Definition: admin/adlist.php:91
eZCheckoutSupplierGateway
Definition: ezcheckoutsuppliergateway.php:36
eZCheckoutSupplierGateway\paymentFile
& paymentFile( $id)
Definition: ezcheckoutsuppliergateway.php:89
eZCheckoutSupplierGateway\$PaymentMethods
$PaymentMethods
Definition: ezcheckoutsuppliergateway.php:107
eZCheckoutSupplierGateway\paymentMethods
& paymentMethods()
Definition: ezcheckoutsuppliergateway.php:64
eZCheckoutSupplierGateway\__construct
__construct()
Definition: ezcheckoutsuppliergateway.php:40
eZCheckoutSupplierGateway\paymentName
& paymentName( $id)
Definition: ezcheckoutsuppliergateway.php:72
$ini
$ini
Definition: classes/admin/linklist.php:64
$id
$id
Definition: companytypelist.php:193
$ret
$ret
Definition: ezsitemanager/admin/filelist.php:88
$paymentMethod
$paymentMethod
Definition: orderedit.php:668
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.