<?php
/**
* @version	$Id: gateways_config.php 11899 2009-07-14 11:11:59Z alex $
* @package	In-Commerce
* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license	Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
*/

$config	=	Array(
					'Prefix'			=>	'gwf',
					'ItemClass'			=>	Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
					'ListClass'			=>	Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
					'EventHandlerClass'	=>	Array('class'=>'GatewayEventHandler','file'=>'gw_event_handler.php','build_event'=>'OnBuild'),
					'TagProcessorClass' =>	Array('class'=>'GatewayTagProcessor','file'=>'gw_tag_processor.php','build_event'=>'OnBuild'),
					'AutoLoad'			=>	true,
					'Hooks'	=>	Array(
												Array(
													'Mode' => hBEFORE,
													'Conditional' => false,
													'HookToPrefix' => 'pt',
													'HookToSpecial' => '',
													'HookToEvent' => Array( 'OnListBuild' ),
													'DoPrefix' => '',
													'DoSpecial' => '',
													'DoEvent' => 'OnCheckGateways',
												),
												Array(
													'Mode' => hBEFORE,
													'Conditional' => true,
													'HookToPrefix' => 'pt',
													'HookToSpecial' => '',
													'HookToEvent' => Array( 'OnCreate', 'OnSave', 'OnUpdate', 'onPreSaveAndGoToTab', 'onPreSaveAndGo' ),
													'DoPrefix' => '',
													'DoSpecial' => '',
													'DoEvent' => 'OnSaveValues',
												),
											),
					'QueryString'		=>	Array(
												1	=>	'id',
												2	=>	'page',
												3	=>	'event',
											),
					'IDField'			=>	'GWConfigFieldId',
					'TableName'			=>	TABLE_PREFIX.'GatewayConfigFields',

					'ListSQLs'			=>	Array	(''=>'SELECT * FROM %s',
													), // key - special, value - list select sql
					'ItemSQLs'			=>	Array(	''=>'SELECT * FROM %s',
																		),

					'Fields' => Array (
						'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
			            'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
			            'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => 0, ),
			            'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
			            'ValueList' => Array('type' => 'string', 'not_null' => 1, 'default' => 0, ),
			            'GatewayId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
					),
					
					'VirtualFields'	=> 	Array	(
													'Value' => Array(),
												),

					'Grids'	=> Array(
								'Default'		=>	Array(
																	'Icons' => Array('default'=>'icon16_custom.gif'),	// icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
																	'Fields' => Array(
																			'FieldName' => Array( 'title'=>'la_Fields' ),
																			'Value' => Array( 'title'=>'la_Value' ),
																		),

																),
													),
	);

?>