--
-- Table structure for table `Classificator_PaymentSystem`
--

CREATE TABLE IF NOT EXISTS `Classificator_PaymentSystem` (
  `PaymentSystem_ID` int(11) NOT NULL AUTO_INCREMENT,
  `PaymentSystem_Name` char(255) NOT NULL DEFAULT '',
  `PaymentSystem_Priority` int(11) DEFAULT NULL,
  `Value` text,
  `Checked` int(1) DEFAULT '1',
  PRIMARY KEY (`PaymentSystem_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;

--
-- Dumping data for table `Classificator_PaymentSystem`
--

INSERT INTO `Classificator_PaymentSystem` (`PaymentSystem_ID`, `PaymentSystem_Name`, `PaymentSystem_Priority`, `Value`, `Checked`) VALUES
(1, 'По квитанции Сбербанка', 1, 'nc_payment_system_sberbank', 1),
(2, 'Payonline', 2, 'nc_payment_system_payonline', 1),
(3, 'WebMoney', 3, 'nc_payment_system_webmoney', 1),
(4, 'Robokassa', 4, 'nc_payment_system_robokassa', 1),
(5, 'Qiwi', 5, 'nc_payment_system_qiwi', 1),
(6, 'PayPal', 6, 'nc_payment_system_paypal', 1),
(7, 'Paymaster', 7, 'nc_payment_system_paymaster', 1),
(8, 'MailMoney', 8, 'nc_payment_system_mailru', 1),
(9, 'Яндекс.Деньги', 9, 'nc_payment_system_yandexcpp', 1),
(10, 'Яндекс.Деньги (устаревшее API)', 10, 'nc_payment_system_yandexemail', 1),
(11, 'Assist', 11, 'nc_payment_system_assist', 1),
(12, 'Platidoma', 12, 'nc_payment_system_platidoma', 1),
(13, 'Счет на юр. лицо', 13, 'nc_payment_system_bank', 1),
(14, 'Оплата Platron онлайн', '1', 'nc_payment_system_platron', 1);
/*(14, 'RBK Money', 14, 'nc_payment_system_rbk', 1)*/;

-- (1, 'Наличными', 1, 'nc_payment_system_cash', 1),

INSERT INTO `Classificator` (`Classificator_Name`, `Table_Name`, `System`, `Sort_Type`, `Sort_Direction`) VALUES
('Платежные системы', 'PaymentSystem', 0, 0, 0);

--
-- Dumping data for table `Module`
--


INSERT INTO `Module` (`Module_Name`, `Keyword`, `Description`, `Parameters`, `Example_URL`, `Help_URL`, `Installed`, `Number`, `Inside_Admin`, `Checked`) VALUES
('NETCAT_MODULE_PAYMENT_NAME', 'payment', 'NETCAT_MODULE_PAYMENT_DESCRIPTION', '', '', '', 1, '', 0, 1);

-- --------------------------------------------------------

--
-- Table structure for table `Payment_SystemSetting`
--

CREATE TABLE IF NOT EXISTS `Payment_SystemSetting` (
  `Param_ID` int(11) NOT NULL AUTO_INCREMENT,
  `System_ID` int(11) NOT NULL,
  `Catalogue_ID` int(11) NOT NULL,
  `Param_Name` varchar(255) NOT NULL,
  `Param_Value` varchar(255) NOT NULL,
  PRIMARY KEY (`Param_ID`),
  KEY `System_ID` (`System_ID`),
  KEY `Catalodue_ID` (`Catalogue_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=30 ;


-- --------------------------------------------------------

--
-- Table structure for table `Payment_SystemsCatalogue`
--

CREATE TABLE IF NOT EXISTS `Payment_SystemCatalogue` (
  `PaymentSystem_ID` int(11) NOT NULL,
  `Catalogue_ID` int(11) NOT NULL,
  `Checked` tinyint(1) NOT NULL,
  PRIMARY KEY (`PaymentSystem_ID`,`Catalogue_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


-- --------------------------------------------------------

--
-- Table structure for table `Payment_SystemsLog`
--

CREATE TABLE IF NOT EXISTS `Payment_Log` (
  `Log_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Payment_Invoice_ID` int(11) DEFAULT NULL,
  `EventType` varchar(255) DEFAULT '',
  `Log` text NOT NULL,
  `Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`Log_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


-- --------------------------------------------------------

--
-- Table structure for table `Payment_Invoice`
--

CREATE TABLE `Payment_Invoice` (
  `Payment_Invoice_ID` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `Payment_System_ID` int(11) UNSIGNED NOT NULL,
  `Amount` decimal(10, 2) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Currency` varchar(10) NOT NULL,
  `Customer_ID` int(11) UNSIGNED NOT NULL,
  `Customer_Email` varchar(255) NOT NULL,
  `Customer_Phone` varchar(255) NOT NULL,
  `Customer_Name` varchar(255) NOT NULL,
  `Order_Source` varchar(20) NOT NULL,
  `Order_ID` int(11) UNSIGNED NOT NULL,
  `Status` int(11) NOT NULL,
  `Last_Response` text NOT NULL,
  PRIMARY KEY (`Payment_Invoice_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;